]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool.py: Tweak last commit.
authorBruno Haible <bruno@clisp.org>
Sun, 10 Mar 2024 22:47:58 +0000 (23:47 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 10 Mar 2024 22:47:58 +0000 (23:47 +0100)
* 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.

ChangeLog
pygnulib/GLEmiter.py
pygnulib/GLImport.py

index d38d67342cb6e821fb63558415c1d9e5cc8d4487..324e0bc04f440e136dc1f7b6d3d2906e60f48dbc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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.
index 9a889fde5a30dbe35a6755d6d0db5171f7624c4f..a904aee8ad0fc07e0dfb4adda81c472a2f83ec12 100644 (file)
@@ -566,7 +566,7 @@ USE_MSGCTXT = no\n"""
         # 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 = ''
index 8864bfd7c0a8d43fa77732bfa9d6444cc1d17f78..64a0bc9b131ac49575ae582e82ae5169a8ac6c5f 100644 (file)
@@ -259,6 +259,7 @@ class GLImport(object):
                     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']:
@@ -266,7 +267,7 @@ class GLImport(object):
             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)
@@ -702,7 +703,6 @@ AC_DEFUN([%s_INIT],
         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.
@@ -716,7 +716,6 @@ AC_DEFUN([%s_INIT],
         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.