Hi Collin, > This patch pretty much copy and pastes a lot of code used from > GLEmiter.lib_Makefile_am into GLEmiter.tests_Makefile_am.
Thanks, I am applying it, together with a fix: When doing copy&paste, one needs to do it _mutatis mutandis_. 2024-03-03 Bruno Haible <br...@clisp.org> gnulib-tool.py: Fix last commit. * pygnulib/GLEmiter.py (GLEmiter.tests_Makefile_am): Ignore libname and libext here. diff --git a/pygnulib/GLEmiter.py b/pygnulib/GLEmiter.py index 7115dfe115..2a8ede9335 100644 --- a/pygnulib/GLEmiter.py +++ b/pygnulib/GLEmiter.py @@ -887,8 +887,8 @@ AC_DEFUN([%V1%_LIBSOURCES], [ def tests_Makefile_am(self, destfile, modules, moduletable, makefiletable, witness_macro, for_test): - '''GLEmiter.tests_Makefile_am(destfile, modules, makefiletable, - witness_c_macro, for_test) -> tuple of string and bool + '''GLEmiter.tests_Makefile_am(destfile, modules, moduletable, + makefiletable, witness_c_macro, for_test) -> tuple of string and bool Emit the contents of the tests Makefile. Returns str and a bool variable which shows if subdirectories are used. @@ -995,14 +995,13 @@ AC_DEFUN([%V1%_LIBSOURCES], [ amsnippet1 += 'libtests_a_LIBADD += @ALLOCA@\n' amsnippet1 += 'libtests_a_DEPENDENCIES += @ALLOCA@\n' - amsnippet1 = constants.combine_lines_matching(re.compile('%s_%s_SOURCES' % (libname, libext)), + amsnippet1 = constants.combine_lines_matching(re.compile('libtests_a_SOURCES'), amsnippet1) # Get unconditional snippet, edit it and save to amsnippet2. amsnippet2 = module.getAutomakeSnippet_Unconditional() pattern = re.compile('lib_([A-Z][A-Z]*)', re.M) - amsnippet2 = pattern.sub('%s_%s_\\1' % (libname, libext), - amsnippet2) + amsnippet2 = pattern.sub('libtests_a_\\1', amsnippet2) amsnippet2 = amsnippet2.replace('$(GNULIB_', '$(' + module_indicator_prefix + '_GNULIB_') # Skip the contents if it's entirely empty.