From 7387385643e015b11ef0f5e119651b413687dabb Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Thu, 28 Mar 2024 02:40:46 -0700 Subject: [PATCH] gnulib-tool.py: Fix missing 'gnulib-cache.m4' in EXTRA_DIST. * pygnulib/GLMakefileTable.py (GLMakefileTable.parent): Fix the loop condition so that it matches gnulib-tool.sh. --- ChangeLog | 6 ++++++ pygnulib/GLMakefileTable.py | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 10831fe9e7..a5a7ac7ea1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-03-28 Collin Funk + + gnulib-tool.py: Fix missing 'gnulib-cache.m4' in EXTRA_DIST. + * pygnulib/GLMakefileTable.py (GLMakefileTable.parent): Fix the loop + condition so that it matches gnulib-tool.sh. + 2024-03-28 Collin Funk gnulib-tool.py: Fix whitespace in gnulib-comp.m4. diff --git a/pygnulib/GLMakefileTable.py b/pygnulib/GLMakefileTable.py index 40fbc44c43..17a35ee935 100644 --- a/pygnulib/GLMakefileTable.py +++ b/pygnulib/GLMakefileTable.py @@ -35,6 +35,7 @@ __copyright__ = constants.__copyright__ # Define global constants #=============================================================================== TESTS = constants.TESTS +isfile = os.path.isfile joinpath = constants.joinpath @@ -98,9 +99,9 @@ class GLMakefileTable(object): dir1 = '%s%s' % (m4base, os.path.sep) dir2 = '' while (dir1 - and (joinpath(self.config['destdir'], dir1, 'Makefile.am') - or joinpath(dir1, 'Makefile.am') == joinpath(sourcebase, source_makefile_am) - or (gentests and joinpath(dir1, 'Makefile.am') == joinpath(testsbase, tests_makefile_am)))): + and not (isfile(joinpath(self.config['destdir'], dir1, 'Makefile.am')) + or joinpath(dir1, 'Makefile.am') == joinpath(sourcebase, source_makefile_am) + or (gentests and joinpath(dir1, 'Makefile.am') == joinpath(testsbase, tests_makefile_am)))): dir2 = joinpath(os.path.basename(dir1), dir2) dir1 = os.path.dirname(dir1) self.editor(dir1, 'EXTRA_DIST', joinpath(dir2, 'gnulib-cache.m4')) -- 2.39.5