From 3b2d33ef84ed717e875790b34bac028529420c08 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Mon, 19 Oct 2015 00:14:27 +0300 Subject: Made gtkdochelper take arguments by switches rather than location. --- modules/gnome.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'modules/gnome.py') diff --git a/modules/gnome.py b/modules/gnome.py index 231cbd4..a744ab2 100644 --- a/modules/gnome.py +++ b/modules/gnome.py @@ -227,12 +227,12 @@ 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] res = [build.RunTarget(targetname, command, args, state.subdir)] if kwargs.get('install', True): res.append(build.InstallScript([command] + args)) -- cgit v1.1 From 0b63f32fe33298bb373522b0a717e186a4d0ebd4 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Mon, 19 Oct 2015 00:26:54 +0300 Subject: Can specify extra args to gtkdoc-scan. --- modules/gnome.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'modules/gnome.py') diff --git a/modules/gnome.py b/modules/gnome.py index a744ab2..9e2b476 100644 --- a/modules/gnome.py +++ b/modules/gnome.py @@ -233,6 +233,17 @@ class GnomeModule: '--headerdir=' + header_dir, '--mainfile=' + main_file, '--modulename=' + modulename] + try: + html_args = kwargs['html_args'] + if not isinstance(html_args, list): + html_args = [html_args] + for i in html_args: + if not isinstance(i, str): + raise MesonException('html_args values must be strings.') + except KeyError: + html_args = [] + if len(html_args) > 0: + args.append('--htmlargs=' + '@@'.join(html_args)) res = [build.RunTarget(targetname, command, args, state.subdir)] if kwargs.get('install', True): res.append(build.InstallScript([command] + args)) -- cgit v1.1 From bbbe102cc29a19c726095dbd5118c515996e64f0 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Mon, 19 Oct 2015 00:35:41 +0300 Subject: Can set extra args to gtkdoc scan. --- modules/gnome.py | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'modules/gnome.py') diff --git a/modules/gnome.py b/modules/gnome.py index 9e2b476..f126bcf 100644 --- a/modules/gnome.py +++ b/modules/gnome.py @@ -233,21 +233,26 @@ class GnomeModule: '--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: - html_args = kwargs['html_args'] - if not isinstance(html_args, list): - html_args = [html_args] - for i in html_args: + 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: - html_args = [] + return[] if len(html_args) > 0: - args.append('--htmlargs=' + '@@'.join(html_args)) - res = [build.RunTarget(targetname, command, args, state.subdir)] - if kwargs.get('install', True): - res.append(build.InstallScript([command] + args)) - return res + return ['--htmlargs=' + '@@'.join(new_args)] + return [] def gdbus_codegen(self, state, args, kwargs): if len(args) != 2: -- cgit v1.1