diff options
-rw-r--r-- | mesonbuild/modules/gnome.py | 9 | ||||
-rw-r--r-- | test cases/frameworks/10 gtk-doc/doc/meson.build | 2 | ||||
-rw-r--r-- | test cases/frameworks/10 gtk-doc/meson.build | 4 |
3 files changed, 13 insertions, 2 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 718d07a..2c37655 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -295,6 +295,15 @@ class GnomeModule: res.append(build.InstallScript(command + args)) return res + def gtkdoc_html_dir(self, state, args, kwarga): + if len(args) != 1: + raise MesonException('Must have exactly one argument.') + modulename = args[0] + if not isinstance(modulename, str): + raise MesonException('Argument must be a string') + return os.path.join('share/gtkdoc/html', modulename) + + def unpack_args(self, arg, kwarg_name, kwargs): try: new_args = kwargs[kwarg_name] diff --git a/test cases/frameworks/10 gtk-doc/doc/meson.build b/test cases/frameworks/10 gtk-doc/doc/meson.build index 3172b42..5f08e89 100644 --- a/test cases/frameworks/10 gtk-doc/doc/meson.build +++ b/test cases/frameworks/10 gtk-doc/doc/meson.build @@ -1,5 +1,3 @@ -gnome = import('gnome') - cdata = configuration_data() cdata.set('VERSION', '1.0') configure_file(input : 'version.xml.in', diff --git a/test cases/frameworks/10 gtk-doc/meson.build b/test cases/frameworks/10 gtk-doc/meson.build index 9712f21..c6881ab 100644 --- a/test cases/frameworks/10 gtk-doc/meson.build +++ b/test cases/frameworks/10 gtk-doc/meson.build @@ -1,5 +1,9 @@ project('gtkdoctest', 'c') +gnome = import('gnome') + +assert(gnome.gtkdoc_html_dir('foobar') == 'share/gtkdoc/html/foobar', 'Gtkdoc install dir is incorrect.') + inc = include_directories('include') # We have to disable this test until this bug fix has landed to |