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

ChangeLog
pygnulib/GLConfig.py
pygnulib/GLImport.py

index c5c7dae203d7e5b20af5ca02f0bde53efd815185..242ad3ff4c1e27d446b50f42980712700e23a565 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-04-12  Bruno Haible  <bruno@clisp.org>
+
+       gnulib-tool.py: Implement --no-libtool option correctly.
+       * pygnulib/GLConfig.py (GLConfig.default): For 'libtool', return None,
+       not False.
+       (GLConfig.checkLibtool): Update result type.
+       (resetLibtool): Reset to return None, not False.
+       * pygnulib/GLImport.py (GLImport.actioncmd): Update.
+
 2024-04-12  Bruno Haible  <bruno@clisp.org>
 
        gnulib-tool.py: Accept conditional dependencies with tests.
index 90b7bd984ae8758d90f4297d28042f22150adbf1..1ac40207a3b3fa3431b31d795f5cb7b13726a61b 100644 (file)
@@ -318,13 +318,13 @@ class GLConfig:
             elif key in ['localpath', 'modules', 'avoids', 'tests',
                          'incl_test_categories', 'excl_test_categories']:
                 return []
-            elif key in ['incobsolete', 'libtool', 'gnu_make',
+            elif key in ['incobsolete', 'gnu_make',
                          'automake_subdir', 'automake_subdir_tests', 'conddeps',
                          'libtests', 'dryrun']:
                 return False
             elif key in ['copymode', 'lcopymode']:
                 return CopyAction.Copy
-            elif key in ['lgpl', 'vc_files']:
+            elif key in ['lgpl', 'libtool', 'vc_files']:
                 return None
             elif key == 'errors':
                 return True
@@ -788,7 +788,7 @@ class GLConfig:
         self.table['libname'] = 'libgnu'
 
     # Define libtool methods.
-    def checkLibtool(self) -> bool:
+    def checkLibtool(self) -> bool | None:
         '''Check if user enabled libtool rules.'''
         return self.table['libtool']
 
@@ -802,7 +802,7 @@ class GLConfig:
 
     def resetLibtool(self) -> None:
         '''Reset libtool rules.'''
-        self.table['libtool'] = False
+        self.table['libtool'] = None
 
     # Define conddeps methods.
     def checkCondDeps(self) -> bool:
index 31380a0108eb7ef69560fb0c6108344de1429299..5f95706fc75f5648b771ca6d79546b546956bef6 100644 (file)
@@ -448,9 +448,9 @@ class GLImport:
             actioncmd += ' \\\n#  --conditional-dependencies'
         else:  # if not conddeps
             actioncmd += ' \\\n#  --no-conditional-dependencies'
-        if libtool:
+        if libtool == True:
             actioncmd += ' \\\n#  --libtool'
-        else:  # if not libtool
+        else:  # if libtool == False or libtool == None
             actioncmd += ' \\\n#  --no-libtool'
         actioncmd += ' \\\n#  --macro-prefix=%s' % macro_prefix
         if podomain: