diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-07-17 12:40:09 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-07-17 21:42:53 +0530 |
commit | b9caaf94bc918dc8831889e1c6de5bbc9ad2a481 (patch) | |
tree | d5da0ac87a8520f4a73575793bbb0bbdd2aadc2a | |
parent | 3bf44e21bba1b83c0f8698779263a5e7679d6f19 (diff) | |
download | meson-b9caaf94bc918dc8831889e1c6de5bbc9ad2a481.zip meson-b9caaf94bc918dc8831889e1c6de5bbc9ad2a481.tar.gz meson-b9caaf94bc918dc8831889e1c6de5bbc9ad2a481.tar.bz2 |
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.
-rw-r--r-- | docs/markdown/Gnome-module.md | 4 | ||||
-rw-r--r-- | mesonbuild/scripts/gtkdochelper.py | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/docs/markdown/Gnome-module.md b/docs/markdown/Gnome-module.md index 61b88ad..098f030 100644 --- a/docs/markdown/Gnome-module.md +++ b/docs/markdown/Gnome-module.md @@ -134,14 +134,14 @@ This also creates two targets for translations `help-$project-update-po` and `he ### gnome.gtkdoc() -Compiles and installs gtkdoc documentation. Takes one positional arguments; The name of the module. +Compiles and installs gtkdoc documentation into `prefix/share/gtk-doc/html`. Takes one positional argument: The name of the module. * `main_xml`: specifies the main XML file * `main_sgml`: equal to `main_xml` * `src_dir`: include_directories to include * `dependencies`: a list of dependencies * `install`: if true, installs the generated docs -* `install_dir`: the directory to install the generated docs +* `install_dir`: the directory to install the generated docs relative to the gtk-doc html dir or an absolute path (default: module name) * `scan_args`: a list of arguments to pass to `gtkdoc-scan` * `scanobjs_args`: a list of arguments to pass to `gtkdoc-scangobj` * `gobject_typesfile`: a list of type files diff --git a/mesonbuild/scripts/gtkdochelper.py b/mesonbuild/scripts/gtkdochelper.py index a2cbf5a..45ed96b 100644 --- a/mesonbuild/scripts/gtkdochelper.py +++ b/mesonbuild/scripts/gtkdochelper.py @@ -218,12 +218,14 @@ def run(args): options.mode) if 'MESON_INSTALL_PREFIX' in os.environ: - install_dir = options.install_dir if options.install_dir else options.modulename destdir = os.environ.get('DESTDIR', '') - installdir = destdir_join(destdir, os.environ['MESON_INSTALL_PREFIX']) + install_prefix = destdir_join(destdir, os.environ['MESON_INSTALL_PREFIX']) + install_dir = options.install_dir if options.install_dir else options.modulename + if os.path.isabs(install_dir): + install_dir = destdir_join(destdir, install_dir) install_gtkdoc(options.builddir, options.subdir, - installdir, + install_prefix, 'share/gtk-doc/html', install_dir) return 0 |