summaryrefslogtreecommitdiff
path: root/mesonbuild/scripts/gtkdochelper.py
Commit message (Collapse)AuthorAgeFilesLines
* typing: fully annotate scriptsDaniel Mensinger2020-09-081-9/+10
|
* Also adjust PATH in gtkdochelper for CygwinJon Turney2020-06-131-3/+5
| | | | | Also do Windows loader specific PATH adjustment (to emulate rpath) in gtkdochelper for Cygwin.
* gtkdochelper.py: Ignore UnicodeEncodeError when printing outputChun-wei Fan2020-04-211-1/+8
| | | | | | | Windows cmd.exe consoles may be using a code page that might choke print() when we are outputting the output from calling gtk-doc. Let's just ignore the error when it happens and print as much as we could in this situation.
* gtkdochelper.py: Support Windows cmd.exe consolesChun-wei Fan2020-04-211-0/+1
| | | | | | On Windows, prepend the commands to call the gtk-doc scripts using the currently-used Python executable, since Windows cmd.exe consoles do not support shebang lines.
* mesonlib.split_args/quote_arg/join_argsAleksey Gurtovoy2019-09-051-3/+2
|
* gtkdoc: Use find_program() to get gtkdoc toolsXavier Claessens2019-08-041-14/+19
| | | | | | | This will allow using gtk-doc as a subproject instead of having to install it on the system. It also has the side effect of failing at configuration time with a proper message if gtkdoc is not installed, instead of failing at build time with a python backtrace.
* Don't use len() to test for container emptinessDylan Baker2019-04-251-7/+7
| | | | | | I ran the numbers once before (it's in the meson history) but it's *much* faster to *not* use len for testing if a container is empty or not.
* gtkdochelper: show full command if it failsRoss Burton2018-09-281-1/+1
| | | | | Instead of showing just the command invoked, it's useful when debugging to also show all of the arguments.
* gnome: add support for `module_version`Marco Trevisan (Treviño)2018-09-211-3/+14
| | | | | | | | | | | gtk-doc for autotools has the concept of module version, that is used to define the module install path and the devhelp2 basename. Add a `module_version` parameter to gnome.gtkdoc to replicate the same behavior. Updated the test checking that the install_dir is properly computed (if not passed), and that the .devhelp2 file has proper name. https://gitlab.gnome.org/GNOME/gtk-doc/blob/GTK_DOC_1_29/buildsystems/autotools/gtk-doc.make#L269
* gtkdoc: set PATH on Windows when executing gtkdoc-scangobj. Fixes #3307Christoph Reiter2018-08-071-8/+15
| | | | | | | | | | | The code was adding the library paths to LD_LIBRARY_PATH, but that doesn't work on Windows where they need to be added to PATH instead. Move the environ handling into gtkdoc_run_check() and add paths to PATH instead of LD_LIBRARY_PATH when on Windows. This fixes the gtk-doc build for glib on Windows (in case glib isn't installed already)
* scripts/gtkdochelper: add support for --runRoss Burton2018-07-091-1/+4
| | | | | | | | | gtkdoc-scangobj has a --run argument that specifies a wrapper to be used when executing the GObject scanner. Typically this can be libtool but it is also useful in cross-compilation environments. This patch adds support for this argument to the gtkdochelper so that tools using the helper can pass --run if required.
* gtkdoc: Use generated types file if there is oneXavier Claessens2018-06-261-0/+5
| | | | Closes: #3773.
* gtkdochelper: pass CC to gtkdoc-scangobjRoss Burton2018-06-201-0/+1
| | | | | The helper is told what CC to use already, but doesn't pass it to gtkdoc-scangobj.
* gtkdoc: Run gtkdoc-scangobj command from build directoryXavier Claessens2018-06-171-2/+3
| | | | | | | All paths in CFLAGS are relative to build_root, so current directory must be there we invoking gtkdoc-scangobj. Closes: #3379
* gnome.gtkdoc: Allow passing file objects as xml_filesNirbheek Chauhan2018-05-061-3/+6
| | | | | | | | | | | If we pass a source files() object, we will look for it in the build directory, which is wrong. If we pass a build files() object (from configure_file()), we will find it in the build directory, and then try to copy it on top of itself in gtkdochelper.py getting a SameFileError. Add a test for it, and also properly iterate custom target outputs when adding to content files.
* gtkdochelper: print warningsSébastien Wilmet2018-04-021-0/+2
| | | | | | | The GTK-Doc commands output was never printed, except in case of error. So there was no way to see the warnings. https://github.com/mesonbuild/meson/issues/2396
* gtkdochelper: Set LD_LIBRARY_PATH from -Wl,-rpath argumentsTing-Wei Lan2018-01-071-3/+15
| | | | | | | | | | | | | | gnome.gtkdoc uses -Wl,-rpath to ensure the scanner executable built by gtkdoc-scangobj will load shared libraries from the correct directories. However, FreeBSD configures its linker to use --enable-new-dtags by default, which converts RPATH to RUNPATH. If users have LD_LIBRARY_PATH environment variable set, RUNPATH will be overrided by LD_LIBRARY_PATH and libraries will be loaded from wrong directories, causing undefined symbol error when running the executable. In order to solve the problem, we have to prepend directories specified with -Wl,-rpath to LD_LIBRARY_PATH to avoid relying on the deprecated RPATH attribute.
* gtkdoc: Pass the linker down to gtkdoc-scangobjXavier Claessens2017-11-071-1/+2
| | | | Closes #2540
* gnome.gtkdoc: Handle absolute install_dirs correctlyNirbheek Chauhan2017-07-171-3/+5
| | | | | Must prepend DESTDIR in case it's absolute. Also document that by default it is relative to the gtk-doc html directory.
* Add mkdb_args support to gnome.gtkdoc()Emmanuele Bassi2017-05-281-1/+10
| | | | | | | There are cases where we need to specify arguments to gtkdoc-mkdb, like telling it to scan extensions that are not '.h' and '.c'. Let's add a new named argument to gnome.gtkdoc(), as well as the plumbing needed for the gtk-doc helper script.
* gtkdochelper: Fix type file name optionRafael Fontenelle2017-04-131-1/+1
| | | | 'gtkdoc-scangobj' script was recently ported to Python (it was Perl), and it now requires providing '--type' option to specify the name of the file to store the types in. Without this option, 'gtkdockelper' will exit with error status 2 and will throw a message "gtkdoc-scangobj: error: unrecognized arguments: <typefile>"
* style: [E303] too many blank lines (2)Mike Sinkovsky2017-01-111-1/+0
|
* style: fix E128 violationsIgor Gnatenko2017-01-011-1/+3
| | | | | | E128: continuation line under-indented for visual indent Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* remove shebangs from scriptsIgor Gnatenko2016-12-181-1/+0
| | | | | | | | | | | | | | | | | meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/regen_checker.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/meson_test.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/meson_benchmark.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/meson_exe.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/symbolextractor.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/commandrunner.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/gtkdochelper.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/meson_install.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/depfixer.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/dirchanger.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/delwithsuffix.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/vcstagger.py 644 /usr/bin/python3 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* gnome.gtkdoc(): Include builddir variant of include dirs alsoPatrick Griffis2016-12-121-1/+9
| | | | | This avoids the need for users to constantly join paths themselves as this is commonly included.
* Use universal_newlines=True for all Popen callsNirbheek Chauhan2016-12-111-8/+6
| | | | | | | | | | | Instead of adding it everywhere manually, create a wrapper called mesonlib.Popen_safe and use that everywhere that we call an executable and extract its output. This will also allow us to tweak it to do more/different things if needed for some locales and/or systems. Closes #1079
* Merge pull request #1151 from mesonbuild/tingping/gtk-docJussi Pakkanen2016-12-061-14/+34
|\ | | | | gnome: Various improvements to gtkdoc
| * gnome.gtkdoc(): Add keyword to override the modePatrick Griffis2016-12-061-7/+24
| | | | | | | | | | | | I'm not entirely sure if you ever want to mix and match but I can say that glib required none of them to be passed so this allows for that.
| * gnome.gtkdoc(): Add namespace keywordPatrick Griffis2016-12-061-2/+6
| |
| * gnome.gtkdoc(): Allow passing multiple source dirsPatrick Griffis2016-12-061-7/+6
| | | | | | | | This is valid and used by glib for example.
| * gnome.gtkdoc(): Fix including doc source dir in pathPatrick Griffis2016-12-061-1/+1
| |
* | misc: Use relative imports everywhereNirbheek Chauhan2016-12-071-2/+2
|/ | | | | | Using 'mesonbuild' as the module can cause it to use the system-installed module and can also break if we rename the directory, so avoid that by always using relative imports.
* scripts/gtkdochelper: ignore_headers is a listNirbheek Chauhan2016-11-121-4/+5
| | | | | | Also, only add it if it's defined. Closes #1020
* gtkdoc: Add `ignore_headers` positional argumentEmmanuele Bassi2016-11-011-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Not all headers are public, or contain public types. GTK-Doc allows adding headers to be ignored during the "scan" phase, by passing the `--ignore-headers` command line argument to gtkdoc-scan. Currently, you can do something like: ignored_headers = [ 'foo-private.h', 'bar-private.h', ] gnome.gtkdoc(... scan_args: [ '--ignore-headers=' + ' '.join(ignored_headers), ], ...) But it does not guarantee escaping rules and it's definitely not nice. We can add a simpler version of that mechanism through a new positional argument, `ignore_headers`, which behaves like `content_files` or `html_assets`, and takes an array of header files to ignore: gnome.gtkdoc(... ignore_headers: ignored_headers, ...)
* gtkdochelper: Add 'overrides.txt' to the content filesEmmanuele Bassi2016-11-011-0/+4
| | | | | | | | | | | | If a `<modulename>-overrides.txt` file exists in the docs directory it means it's intended to be used in place of the one gtk-doc generates. GLib and GTK+, for instance, ship with one because some of the types they provide — like the thread primitives, or the platform macros — contain architecture-dependent fields that should not be accessed directly. This commit should close the last bit of issue #550.
* gnome: Include build dir in gtkdoc-mkhtml pathPatrick Griffis2016-10-191-1/+1
|
* Remove shebangs on files that are not runnable and add execute bits to those ↵Jussi Pakkanen2016-10-071-0/+0
| | | | that are.
* gnome: Allow specifying gtkdoc where to install directoryThibault Saunier2016-09-261-1/+3
|
* gnome: Run gtkdoc-scanobjs and add a way to get assets workingThibault Saunier2016-09-261-17/+67
| | | | | | | | | | | | | Allowing the object tree to be generated. We need to add options to allow copying the ncesseary sources and assets so the HTML generator can work with them (everything is relative so we need to copy them in the build directory). Until now the documentation was not generated from the user provided main sgml file but it was using a generated one, which lead to a broken documentation. Starting using it revealed the other bugs fixed in that commit.
* gtkdochelper: Add error checking and printingNirbheek Chauhan2016-07-241-13/+23
| | | | This helps debug why things are failing
* scripts: Use destdir_join fix for all DESTDIR prefixing (#598)Nirbheek Chauhan2016-06-161-4/+3
|
* Support passing extra arguments to gtkdoc-fixxrefEmmanuele Bassi2016-05-251-3/+9
| | | | | | | | The extra arguments are typically used to specified the location of installed API references that gtk-doc can use to create cross links for symbols. Fixes #555
* Renamed meson package to mesonbuild so that we can have a script named meson ↵Jussi Pakkanen2016-01-161-0/+122
in the same toplevel dir.