+2024-03-10 Bruno Haible <bruno@clisp.org>
+
+ gnulib-tool.py: Tweak last commit.
+ * pygnulib/GLEmiter.py (GLEmiter.initmacro_end): Avoid an implicit str
+ to bool conversion.
+ * pygnulib/GLImport.py (GLImport.__init__): Add a comment. Don't allow
+ a '|' in place of whitespace. Don't emit redundant gl_source_base
+ assignments.
+
2024-03-10 Collin Funk <collin.funk1@gmail.com>
gnulib-tool.py: Follow gnulib-tool changes, part 51.
# arguments. The check is performed only when autoconf is run from the
# directory where the configure.ac resides; if it is run from a different
# directory, the check is skipped.
- if automake_subdir and not gentests and sourcebase and sourcebase != '.':
+ if automake_subdir and not gentests and sourcebase != '' and sourcebase != '.':
subdir = f'{sourcebase}/'
else:
subdir = ''
self.config.update_key(config, key)
self.config.setModules(modules)
+ # Determine whether --automake-subdir is supported.
if self.config['automake_subdir']:
found_subdir_objects = False
if self.config['destdir']:
else:
base = '.'
if isfile(joinpath(base, 'Makefile.am')):
- pattern = re.compile(r'^AUTOMAKE_OPTIONS[\t| ]*=(.*)$', re.MULTILINE)
+ pattern = re.compile(r'^AUTOMAKE_OPTIONS[\t ]*=(.*)$', re.MULTILINE)
with open(joinpath(base, 'Makefile.am'), encoding='utf-8') as file:
data = file.read()
automake_options = pattern.findall(data)
emit += ' gl_m4_base=\'%s\'\n' % m4base
emit += self.emitter.initmacro_start(macro_prefix, False)
emit += self.emitter.shellvars_init(False, sourcebase)
- emit += ' gl_source_base=\'%s\'\n' % sourcebase
if witness_c_macro:
emit += ' m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [%s])\n' % witness_c_macro
# Emit main autoconf snippets.
emit += ' gltests_ltlibdeps=\n'
emit += self.emitter.initmacro_start('%stests' % macro_prefix, gentests)
emit += self.emitter.shellvars_init(True, testsbase)
- emit += ' gl_source_base=\'%s\'\n' % testsbase
# Define a tests witness macro that depends on the package.
# PACKAGE is defined by AM_INIT_AUTOMAKE, PACKAGE_TARNAME is defined by
# AC_INIT.