]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
gnulib-tool.py: Fix missing 'gnulib-cache.m4' in EXTRA_DIST.
authorCollin Funk <collin.funk1@gmail.com>
Thu, 28 Mar 2024 09:40:46 +0000 (02:40 -0700)
committerBruno Haible <bruno@clisp.org>
Thu, 28 Mar 2024 11:33:15 +0000 (12:33 +0100)
* pygnulib/GLMakefileTable.py (GLMakefileTable.parent): Fix the loop
condition so that it matches gnulib-tool.sh.

ChangeLog
pygnulib/GLMakefileTable.py

index 10831fe9e7528fb5302f838c7916ba8df4e78646..a5a7ac7ea13bb05530baf5d99ad20545d878df29 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-03-28  Collin Funk  <collin.funk1@gmail.com>
+
+       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  <collin.funk1@gmail.com>
 
        gnulib-tool.py: Fix whitespace in gnulib-comp.m4.
index 40fbc44c4383e9589258b15c4878197fd84ba9b8..17a35ee935abf95213e8155bc44b5056622db5f5 100644 (file)
@@ -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'))