+2024-03-19 Collin Funk <collin.funk1@gmail.com>
+
+ gnulib-tool.py: Follow gnulib-tool changes, part 66.
+ Follow gnulib-tool change
+ 2021-12-25 Bruno Haible <bruno@clisp.org>
+ gnulib-tool: Fix handling of module libtextstyle-optional.
+ * pygnulib/GLModuleSystem.py (GLModule.repeatModuleInTests): New function.
+ * pygnulib/GLEmiter.py (GLEmiter.tests_Makefile_am): Use it for creating
+ the tests/Makefile.am.
+ * pygnulib/GLTestDir.py (GLTestDir.execute): Use it when creating the
+ file list.
+
2024-03-19 Collin Funk <collin.funk1@gmail.com>
gnulib-tool.py: Follow gnulib-tool changes, part 65.
--------------------------------------------------------------------------------
-commit 9af17c55629c4cbe2facdc9edb5242136567ebba
-Author: Bruno Haible <bruno@clisp.org>
-Date: Sat Dec 25 14:30:57 2021 +0100
-
- gnulib-tool: Fix handling of module libtextstyle-optional.
-
- Reported by Paul Eggert in
- <https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00152.html>.
-
- * gnulib-tool (func_repeat_module_in_tests): New function.
- (func_emit_tests_Makefile_am, func_create_testdir): Use it for the file
- list and when creating tests/Makefile.am.
-
---------------------------------------------------------------------------------
-
commit 30459fe101541698ec704acb224946d73676750e
Author: Bruno Haible <bruno@clisp.org>
Date: Thu Jun 8 15:09:31 2017 +0200
longrun_snippets = ''
for module in modules:
if for_test and not single_configure:
- accept = module.isTests()
+ if module.repeatModuleInTests():
+ accept = True
+ else:
+ accept = module.isTests()
else: # if for_test and not single_configure
accept = True
if accept:
result = self.modulesystem.find(self.getTestsName())
return result
+ def repeatModuleInTests(self) -> bool:
+ '''Tests whether, when the tests have their own configure.ac script,
+ a given module should be repeated in the tests, although it was
+ already among the main modules.'''
+ # This module is special because it relies on a gl_LIBTEXTSTYLE_OPTIONAL
+ # invocation that it does not itself do or require. Therefore if the
+ # tests contain such an invocation, the module - as part of tests -
+ # will produce different AC_SUBSTed variable values than the same module
+ # - as part of the main configure.ac -.
+ result = self.getName() == 'libtextstyle-optional'
+ return result
+
def getDependenciesRecursively(self) -> str:
'''Return a list of recursive dependencies of this module separated
by a newline.'''
if single_configure:
main_filelist, tests_filelist = \
moduletable.filelist_separately(main_modules, tests_modules)
- filelist = sorted(set(main_filelist + tests_filelist))
else: # if not single_configure
- filelist = moduletable.filelist(modules)
+ main_modules = modules
+ tests_modules = [ module
+ for module in modules
+ if module.repeatModuleInTests() ]
+ main_filelist, tests_filelist = \
+ moduletable.filelist_separately(main_modules, tests_modules)
- filelist = sorted(set(filelist))
+ filelist = sorted(set(main_filelist + tests_filelist))
# Print list of files.
if verbose >= 0: