From 64009cc85393232d27942a35ca0bddb2d6037e78 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 3 Mar 2024 11:12:39 +0100 Subject: [PATCH] gnulib-tool.py: Fix last commit. * pygnulib/GLEmiter.py (GLEmiter.tests_Makefile_am): Ignore libname and libext here. --- ChangeLog | 6 ++++++ pygnulib/GLEmiter.py | 9 ++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 68d944dd14..c5bfab2ef7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-03-03 Bruno Haible + + gnulib-tool.py: Fix last commit. + * pygnulib/GLEmiter.py (GLEmiter.tests_Makefile_am): Ignore libname and + libext here. + 2024-03-03 Collin Funk gnulib-tool.py: Follow gnulib-tool changes, part 38. 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. -- 2.39.5