diff options
author | Bruno Haible <bruno@clisp.org> | 2022-08-06 02:10:32 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2022-08-06 02:13:45 +0200 |
commit | bfc5329c890031833022bc78b5f0e793a53f5be6 (patch) | |
tree | 4831fcb2d0ae5d49f2b3d44b612600f86629aebe | |
parent | 0108a901f10bf6ed6198e565c35b091c3fe6e218 (diff) | |
download | gnulib-bfc5329c890031833022bc78b5f0e793a53f5be6.tar.gz |
gnulib-tool.py: Finish implementing option --macro-prefix.
* gnulib-tool.py (main): Accept option --macro-prefix.
-rw-r--r-- | ChangeLog | 3 | ||||
-rwxr-xr-x | gnulib-tool.py | 11 | ||||
-rw-r--r-- | gnulib-tool.py.TODO | 1 |
3 files changed, 13 insertions, 2 deletions
@@ -1,5 +1,8 @@ 2022-08-05 Bruno Haible <bruno@clisp.org> + gnulib-tool.py: Finish implementing option --macro-prefix. + * gnulib-tool.py (main): Accept option --macro-prefix. + gnulib-tool.py: Refactor --makefile-name option. * gnulib-tool.py (main): Handle option --makefile-name like all other string-valued options. diff --git a/gnulib-tool.py b/gnulib-tool.py index ba15ba7154..030e3caf73 100755 --- a/gnulib-tool.py +++ b/gnulib-tool.py @@ -374,6 +374,11 @@ def main(): dest='makefile_name', default=None, nargs=1) + # macro-prefix + parser.add_argument('--macro-prefix', + dest='macro_prefix', + default=None, + nargs=1) # single-configure parser.add_argument('--single-configure', dest='single_configure', @@ -559,7 +564,8 @@ def main(): or cmdargs.excl_privileged_tests != None or cmdargs.excl_unportable_tests != None or cmdargs.avoids != None or cmdargs.lgpl != None - or cmdargs.makefile_name != None))): + or cmdargs.makefile_name != None + or cmdargs.macro_prefix != None))): message = '%s: *** ' % constants.APP['name'] message += 'invalid options for --%s mode\n' % mode message += 'Try \'gnulib-tool --help\' for more information.\n' @@ -636,6 +642,9 @@ def main(): makefile_name = cmdargs.makefile_name if makefile_name != None: makefile_name = makefile_name[0] + macro_prefix = cmdargs.macro_prefix + if macro_prefix != None: + macro_prefix = macro_prefix[0] avoids = cmdargs.avoids if avoids != None: avoids = [ module diff --git a/gnulib-tool.py.TODO b/gnulib-tool.py.TODO index 6787e88df2..87438c5a16 100644 --- a/gnulib-tool.py.TODO +++ b/gnulib-tool.py.TODO @@ -29,7 +29,6 @@ Implement the options: --gnu-make --tests-makefile-name --automake-subdir - --macro-prefix --po-domain --witness-c-macro --vc-files |