aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/scripts/gtkdochelper.py
AgeCommit message (Collapse)AuthorFilesLines
2018-06-17gtkdoc: Run gtkdoc-scangobj command from build directoryXavier Claessens1-2/+3
All paths in CFLAGS are relative to build_root, so current directory must be there we invoking gtkdoc-scangobj. Closes: #3379
2018-05-06gnome.gtkdoc: Allow passing file objects as xml_filesNirbheek Chauhan1-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.
2018-04-02gtkdochelper: print warningsSébastien Wilmet1-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
2018-01-07gtkdochelper: Set LD_LIBRARY_PATH from -Wl,-rpath argumentsTing-Wei Lan1-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.
2017-11-07gtkdoc: Pass the linker down to gtkdoc-scangobjXavier Claessens1-1/+2
Closes #2540
2017-07-17gnome.gtkdoc: Handle absolute install_dirs correctlyNirbheek Chauhan1-3/+5
Must prepend DESTDIR in case it's absolute. Also document that by default it is relative to the gtk-doc html directory.
2017-05-28Add mkdb_args support to gnome.gtkdoc()Emmanuele Bassi1-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.
2017-04-13gtkdochelper: Fix type file name optionRafael Fontenelle1-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>"
2017-01-11style: [E303] too many blank lines (2)Mike Sinkovsky1-1/+0
2017-01-01style: fix E128 violationsIgor Gnatenko1-1/+3
E128: continuation line under-indented for visual indent Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-18remove shebangs from scriptsIgor Gnatenko1-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>
2016-12-12gnome.gtkdoc(): Include builddir variant of include dirs alsoPatrick Griffis1-1/+9
This avoids the need for users to constantly join paths themselves as this is commonly included.
2016-12-11Use universal_newlines=True for all Popen callsNirbheek Chauhan1-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
2016-12-06Merge pull request #1151 from mesonbuild/tingping/gtk-docJussi Pakkanen1-14/+34
gnome: Various improvements to gtkdoc
2016-12-06gnome.gtkdoc(): Add keyword to override the modePatrick Griffis1-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.
2016-12-07misc: Use relative imports everywhereNirbheek Chauhan1-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.
2016-12-06gnome.gtkdoc(): Add namespace keywordPatrick Griffis1-2/+6
2016-12-06gnome.gtkdoc(): Allow passing multiple source dirsPatrick Griffis1-7/+6
This is valid and used by glib for example.
2016-12-06gnome.gtkdoc(): Fix including doc source dir in pathPatrick Griffis1-1/+1
2016-11-12scripts/gtkdochelper: ignore_headers is a listNirbheek Chauhan1-4/+5
Also, only add it if it's defined. Closes #1020
2016-11-01gtkdoc: Add `ignore_headers` positional argumentEmmanuele Bassi1-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, ...)
2016-11-01gtkdochelper: Add 'overrides.txt' to the content filesEmmanuele Bassi1-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.
2016-10-19gnome: Include build dir in gtkdoc-mkhtml pathPatrick Griffis1-1/+1
2016-10-07Remove shebangs on files that are not runnable and add execute bits to those ↵Jussi Pakkanen1-0/+0
that are.
2016-09-26gnome: Allow specifying gtkdoc where to install directoryThibault Saunier1-1/+3
2016-09-26gnome: Run gtkdoc-scanobjs and add a way to get assets workingThibault Saunier1-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.
2016-07-24gtkdochelper: Add error checking and printingNirbheek Chauhan1-13/+23
This helps debug why things are failing
2016-06-16scripts: Use destdir_join fix for all DESTDIR prefixing (#598)Nirbheek Chauhan1-4/+3
2016-05-25Support passing extra arguments to gtkdoc-fixxrefEmmanuele Bassi1-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
2016-01-16Renamed meson package to mesonbuild so that we can have a script named meson ↵Jussi Pakkanen1-0/+122
in the same toplevel dir.