aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-10-20 18:18:17 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2015-10-20 18:18:17 +0300
commit5f2b00233db26b9f35391271152e29fafbce23f7 (patch)
tree4b99639d81ce59763b326e63fc41d65ca08edf2f /modules
parent3103409f6e9792abc6ff4d33596e8d7449d764b7 (diff)
parentbbbe102cc29a19c726095dbd5118c515996e64f0 (diff)
downloadmeson-5f2b00233db26b9f35391271152e29fafbce23f7.zip
meson-5f2b00233db26b9f35391271152e29fafbce23f7.tar.gz
meson-5f2b00233db26b9f35391271152e29fafbce23f7.tar.bz2
Merge pull request #288 from mesonbuild/gdocflags
Can specify extra flags to gtkdoc-scan invocations
Diffstat (limited to 'modules')
-rw-r--r--modules/gnome.py28
1 files changed, 22 insertions, 6 deletions
diff --git a/modules/gnome.py b/modules/gnome.py
index 231cbd4..f126bcf 100644
--- a/modules/gnome.py
+++ b/modules/gnome.py
@@ -227,17 +227,33 @@ class GnomeModule:
header_dir = os.path.join(state.environment.get_source_dir(), src_dir.get_curdir(), incdirs[0])
else:
header_dir = os.path.normpath(os.path.join(state.subdir, src_dir))
- args = [state.environment.get_source_dir(),
- state.environment.get_build_dir(),
- state.subdir,
- header_dir,
- main_file,
- modulename]
+ args = ['--sourcedir=' + state.environment.get_source_dir(),
+ '--builddir=' + state.environment.get_build_dir(),
+ '--subdir=' + state.subdir,
+ '--headerdir=' + header_dir,
+ '--mainfile=' + main_file,
+ '--modulename=' + modulename]
+ args += self.unpack_args('--htmlargs=', 'html_args', kwargs)
+ args += self.unpack_args('--scanargs=', 'scan_args', kwargs)
res = [build.RunTarget(targetname, command, args, state.subdir)]
if kwargs.get('install', True):
res.append(build.InstallScript([command] + args))
return res
+ def unpack_args(self, arg, kwarg_name, kwargs):
+ try:
+ new_args = kwargs[kwarg_name]
+ if not isinstance(new_args, list):
+ new_args = [new_args]
+ for i in new_args:
+ if not isinstance(i, str):
+ raise MesonException('html_args values must be strings.')
+ except KeyError:
+ return[]
+ if len(html_args) > 0:
+ return ['--htmlargs=' + '@@'.join(new_args)]
+ return []
+
def gdbus_codegen(self, state, args, kwargs):
if len(args) != 2:
raise MesonException('Gdbus_codegen takes two arguments, name and xml file.')