Commit Graph

27 Commits

Author SHA1 Message Date
Ting-Wei Lan 9ec950c4ae gtkdochelper: Set LD_LIBRARY_PATH from -Wl,-rpath arguments
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.
2018-01-07 01:56:05 +08:00
Xavier Claessens 7121eb8c51 gtkdoc: Pass the linker down to gtkdoc-scangobj
Closes #2540
2017-11-07 23:56:18 +02:00
Nirbheek Chauhan 04ac7a4844 gnome.gtkdoc: Handle absolute install_dirs correctly
Must prepend DESTDIR in case it's absolute. Also document that by
default it is relative to the gtk-doc html directory.
2017-07-17 12:40:41 +05:30
Emmanuele Bassi f3aa309fa1 Add mkdb_args support to gnome.gtkdoc()
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-05-28 23:58:54 +01:00
Rafael Fontenelle 7c43edb840 gtkdochelper: Fix type file name option
'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-04-13 23:39:22 +03:00
Mike Sinkovsky 77515ee541 style: [E303] too many blank lines (2) 2017-01-11 12:33:27 -05:00
Igor Gnatenko 116da33cdd style: fix E128 violations
E128: continuation line under-indented for visual indent

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01 12:02:05 -05:00
Igor Gnatenko 4fbaf295f6 remove shebangs from scripts
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-18 16:55:34 +01:00
Patrick Griffis c42167dc6f gnome.gtkdoc(): Include builddir variant of include dirs also
This avoids the need for users to constantly join paths themselves
as this is commonly included.
2016-12-12 21:01:49 +02:00
Nirbheek Chauhan 60716fcd6d Use universal_newlines=True for all Popen calls
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-11 01:59:58 +02:00
Jussi Pakkanen c58da4ee52 Merge pull request #1151 from mesonbuild/tingping/gtk-doc
gnome: Various improvements to gtkdoc
2016-12-06 23:27:41 +02:00
Patrick Griffis e265887ac3 gnome.gtkdoc(): Add keyword to override the mode
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-06 14:07:45 -05:00
Nirbheek Chauhan b9a7c0cf39 misc: Use relative imports everywhere
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-07 00:24:17 +05:30
Patrick Griffis d764c7dc91 gnome.gtkdoc(): Add namespace keyword 2016-12-06 13:23:58 -05:00
Patrick Griffis a626d1a7bc gnome.gtkdoc(): Allow passing multiple source dirs
This is valid and used by glib for example.
2016-12-06 12:23:29 -05:00
Patrick Griffis 9b560c29b6 gnome.gtkdoc(): Fix including doc source dir in path 2016-12-06 10:58:18 -05:00
Nirbheek Chauhan 55288b0fcc scripts/gtkdochelper: ignore_headers is a list
Also, only add it if it's defined.

Closes #1020
2016-11-12 11:54:13 -05:00
Emmanuele Bassi e226d702bc gtkdoc: Add `ignore_headers` positional argument
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-01 14:11:48 +00:00
Emmanuele Bassi 6eeecb8585 gtkdochelper: Add 'overrides.txt' to the content files
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-11-01 14:10:56 +00:00
Patrick Griffis 44690763b0 gnome: Include build dir in gtkdoc-mkhtml path 2016-10-19 21:16:29 +03:00
Jussi Pakkanen 1f4cce86ad Remove shebangs on files that are not runnable and add execute bits to those that are. 2016-10-07 21:10:33 +03:00
Thibault Saunier bb3823e6f4 gnome: Allow specifying gtkdoc where to install directory 2016-09-26 15:25:59 -03:00
Thibault Saunier f86fbf6ebf gnome: Run gtkdoc-scanobjs and add a way to get assets working
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-09-26 15:25:59 -03:00
Nirbheek Chauhan 042e0b3467 gtkdochelper: Add error checking and printing
This helps debug why things are failing
2016-07-24 13:48:12 +05:30
Nirbheek Chauhan b2fb4f9d66 scripts: Use destdir_join fix for all DESTDIR prefixing (#598) 2016-06-16 20:43:23 +03:00
Emmanuele Bassi 8998e44cd9 Support passing extra arguments to gtkdoc-fixxref
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-05-25 11:36:33 +01:00
Jussi Pakkanen 23b98cd6e6 Renamed meson package to mesonbuild so that we can have a script named meson in the same toplevel dir. 2016-01-16 17:35:29 +02:00