+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.
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
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']
def resetLibtool(self) -> None:
'''Reset libtool rules.'''
- self.table['libtool'] = False
+ self.table['libtool'] = None
# Define conddeps methods.
def checkCondDeps(self) -> bool:
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: