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 /pygnulib/GLTestDir.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 'pygnulib/GLTestDir.py')
-rw-r--r-- | pygnulib/GLTestDir.py | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/pygnulib/GLTestDir.py b/pygnulib/GLTestDir.py index 3c4ad0b9dc..bf00099283 100644 --- a/pygnulib/GLTestDir.py +++ b/pygnulib/GLTestDir.py @@ -265,33 +265,13 @@ class GLTestDir(object): self.config.setLibtests(True) if single_configure: - # Add dummy package if it is needed. + # Add the dummy module to the main module list if needed. main_modules = moduletable.add_dummy(main_modules) - if 'dummy' in [ str(module) - for module in main_modules ]: - main_modules = [ m - for m in main_modules - if str(m) != 'dummy' ] - dummy = self.modulesystem.find('dummy') - main_modules = sorted(set(main_modules)) + [dummy] if libtests: # if we need to use libtests.a + # Add the dummy module to the tests-related module list if needed. tests_modules = moduletable.add_dummy(tests_modules) - if 'dummy' in [ str(module) - for module in tests_modules ]: - tests_modules = [ m - for m in tests_modules - if str(m) != 'dummy' ] - dummy = self.modulesystem.find('dummy') - tests_modules = sorted(set(tests_modules)) + [dummy] else: # if not single_configure modules = moduletable.add_dummy(modules) - if 'dummy' in [ str(module) - for module in modules ]: - modules = [ m - for m in modules - if str(m) != 'dummy' ] - dummy = self.modulesystem.find('dummy') - modules = sorted(set(modules)) + [dummy] # Show banner notice of every module. if single_configure: |