diff options
author | Bruno Haible <bruno@clisp.org> | 2022-08-10 00:51:59 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2022-08-10 00:53:44 +0200 |
commit | 62fa8fc7b2c9db14d8c24d6ec5beedecb27b4802 (patch) | |
tree | a9a6b6b66960a69c00ed74aaca0e18b63d7438a1 /gnulib-tool.py | |
parent | bc3d94bb2df6fa0c766f6226814c2fc2a55ee049 (diff) | |
download | gnulib-62fa8fc7b2c9db14d8c24d6ec5beedecb27b4802.tar.gz |
gnulib-tool.py: Finish implementing option --conditional-dependencies.
* gnulib-tool.py (main) Accept options --conditional-dependencies,
--no-conditional-dependencies.
* pygnulib/GLModuleSystem.py (GLModuleTable.addConditional): Use
str(module), not module, as key. Fix logic bug.
(GLModuleTable.getCondition): Simplify.
(GLModuleTable.transitive_closure): Show a warning when there are
duplicate dependencies. Fix logic bug.
(GLModuleTable.transitive_closure_separately): Simplify.
(GLModuleTable.add_dummy): Ignore tests modules. Cope with multiple
lib_SOURCES augmentation lines. Cope with comments at the end of a
lib_SOURCES augmentation line. Add the dummy module at the end of the
modules list.
* pygnulib/GLTestDir.py (GLTestDir.execute): Remove the code that forces
the dummy module to the end of the list.
* pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Add code to
terminate the shell functions. Add code for the dependencies from the
unconditional to the conditional modules. Don't emit AM_CONDITIONAL for
unconditional modules.
Diffstat (limited to 'gnulib-tool.py')
-rwxr-xr-x | gnulib-tool.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gnulib-tool.py b/gnulib-tool.py index 9988c84de9..71ef1c4f2c 100755 --- a/gnulib-tool.py +++ b/gnulib-tool.py @@ -298,6 +298,15 @@ def main(): default=None, action='append', nargs=1) + # conditional-dependencies + parser.add_argument('--conditional-dependencies', + dest='cond_dependencies', + default=None, + action="store_true") + parser.add_argument('--no-conditional-dependencies', + dest='cond_dependencies', + default=None, + action="store_false") # libtool parser.add_argument('--libtool', dest='libtool', @@ -659,6 +668,7 @@ def main(): lgpl = lgpl[-1] if lgpl == None: lgpl = True + cond_dependencies = cmdargs.cond_dependencies libtool = cmdargs.libtool makefile_name = cmdargs.makefile_name if makefile_name != None: @@ -682,7 +692,6 @@ def main(): lsymlink = cmdargs.lsymlink == True single_configure = cmdargs.single_configure docbase = None - conddeps = None # Create pygnulib configuration. config = classes.GLConfig( @@ -702,7 +711,7 @@ def main(): lgpl=lgpl, makefile_name=makefile_name, libtool=libtool, - conddeps=conddeps, + conddeps=cond_dependencies, macro_prefix=macro_prefix, podomain=podomain, witness_c_macro=witness_c_macro, |