]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
gnulib-tool.py: Implement --no-conditional-dependencies correctly.
authorBruno Haible <bruno@clisp.org>
Fri, 12 Apr 2024 20:21:57 +0000 (22:21 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 12 Apr 2024 20:21:57 +0000 (22:21 +0200)
* pygnulib/GLConfig.py (GLConfig.default): For 'conddeps', return None,
not False.
(GLConfig.checkCondDeps): Update result type.
(resetCondDeps): Reset to return None, not False.
* pygnulib/GLImport.py (GLImport.actioncmd): Update.

pygnulib/GLConfig.py
pygnulib/GLImport.py

index 1ac40207a3b3fa3431b31d795f5cb7b13726a61b..e938b30a5e6f72653ae9762e0c4453985cbd9ce4 100644 (file)
@@ -319,12 +319,12 @@ class GLConfig:
                          'incl_test_categories', 'excl_test_categories']:
                 return []
             elif key in ['incobsolete', 'gnu_make',
-                         'automake_subdir', 'automake_subdir_tests', 'conddeps',
+                         'automake_subdir', 'automake_subdir_tests',
                          'libtests', 'dryrun']:
                 return False
             elif key in ['copymode', 'lcopymode']:
                 return CopyAction.Copy
-            elif key in ['lgpl', 'libtool', 'vc_files']:
+            elif key in ['lgpl', 'libtool', 'conddeps', 'vc_files']:
                 return None
             elif key == 'errors':
                 return True
@@ -805,7 +805,7 @@ class GLConfig:
         self.table['libtool'] = None
 
     # Define conddeps methods.
-    def checkCondDeps(self) -> bool:
+    def checkCondDeps(self) -> bool | None:
         '''Check if user enabled conditional dependencies.'''
         return self.table['conddeps']
 
@@ -819,7 +819,7 @@ class GLConfig:
 
     def resetCondDeps(self) -> None:
         '''Reset conditional dependencies (may save configure time and object code).'''
-        self.table['conddeps'] = False
+        self.table['conddeps'] = None
 
     # Define lgpl methods.
     def getLGPL(self) -> str | bool | None:
index 5f95706fc75f5648b771ca6d79546b546956bef6..b6c9bbeea39e41dd4ca66ee3815b92cbdc5a77ca 100644 (file)
@@ -444,9 +444,9 @@ class GLImport:
             actioncmd += ' \\\n#  --automake-subdir'
         if automake_subdir_tests:
             actioncmd += ' \\\n#  --automake-subdir-tests'
-        if conddeps:
+        if conddeps == True:
             actioncmd += ' \\\n#  --conditional-dependencies'
-        else:  # if not conddeps
+        else:  # if conddeps == False or conddeps == None
             actioncmd += ' \\\n#  --no-conditional-dependencies'
         if libtool == True:
             actioncmd += ' \\\n#  --libtool'