]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool.py: Follow gnulib-tool changes, part 67.
authorCollin Funk <collin.funk1@gmail.com>
Tue, 19 Mar 2024 02:58:37 +0000 (19:58 -0700)
committerBruno Haible <bruno@clisp.org>
Tue, 19 Mar 2024 09:37:56 +0000 (10:37 +0100)
Follow gnulib-tool change
2022-03-01  Paul Eggert  <eggert@cs.ucla.edu>
Create lib/Makefile.am after gnulib-comp.m4

* pygnulib/GLImport.py (GLImport.execute): Create library makefile after
creating gnulib-comp.m4.

ChangeLog
gnulib-tool.py.TODO
pygnulib/GLImport.py

index 37c4e2801b996f799ad73eac804ecc321208428e..18ecaddc0f8c60f456b8a3458c4d687c3ab19ff8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-03-19  Collin Funk  <collin.funk1@gmail.com>
+
+       gnulib-tool.py: Follow gnulib-tool changes, part 67.
+       Follow gnulib-tool change
+       2022-03-01  Paul Eggert  <eggert@cs.ucla.edu>
+       Create lib/Makefile.am after gnulib-comp.m4
+       * pygnulib/GLImport.py (GLImport.execute): Create library makefile after
+       creating gnulib-comp.m4.
+
 2024-03-19  Collin Funk  <collin.funk1@gmail.com>
 
        gnulib-tool.py: Follow gnulib-tool changes, part 66.
index 819cca07e61e896494f9d2fdd2c405af72d99219..75a51fc6b863e3b2a01dde03779160338569ee7e 100644 (file)
@@ -61,18 +61,6 @@ Date:   Fri Jun 3 17:52:19 2022 -0700
 
 --------------------------------------------------------------------------------
 
-commit 8c4f4d7a3c28f88b64fce2fb1d0dc0e570d1a482
-Author: Paul Eggert <eggert@cs.ucla.edu>
-Date:   Tue Mar 1 10:01:22 2022 -0800
-
-    Create lib/Makefile.am after gnulib-comp.m4
-
-    * gnulib-tool (func_import): Create library makefile after
-    creating gnulib-comp.m4.  With --gnu-make, the latter depends on
-    the former.  See <https://bugs.gnu.org/32452#109>.
-
---------------------------------------------------------------------------------
-
 commit 30459fe101541698ec704acb224946d73676750e
 Author: Bruno Haible <bruno@clisp.org>
 Date:   Thu Jun 8 15:09:31 2017 +0200
index 937c8d42e217059a01fbb5a1be9b5b14580422ee..84bd01ecf312d692f017fa8549b30f2786fd062b 100644 (file)
@@ -1184,33 +1184,6 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix
         self.makefiletable.editor('', 'ACLOCAL_AMFLAGS', m4base)
         self.makefiletable.parent(gentests, source_makefile_am, tests_makefile_am)
 
-        # Create library makefile.
-        basename = joinpath(sourcebase, source_makefile_am)
-        tmpfile = self.assistant.tmpfilename(basename)
-        emit, uses_subdirs = self.emitter.lib_Makefile_am(basename,
-                                                          self.moduletable['main'], self.moduletable, self.makefiletable,
-                                                          actioncmd, for_test)
-        if automake_subdir:
-            emit = sp.run([joinpath(DIRS['root'], 'build-aux/prefix-gnulib-mk'), '--from-gnulib-tool',
-                           f'--lib-name={libname}', f'--prefix={sourcebase}/'],
-                          input=emit, text=True, capture_output=True).stdout
-        with codecs.open(tmpfile, 'wb', 'UTF-8') as file:
-            file.write(emit)
-        filename, backup, flag = self.assistant.super_update(basename, tmpfile)
-        if flag == 1:
-            if not self.config['dryrun']:
-                print('Updating %s (backup in %s)' % (filename, backup))
-            else:  # if self.config['dryrun']
-                print('Update %s (backup in %s)' % (filename, backup))
-        elif flag == 2:
-            if not self.config['dryrun']:
-                print('Creating %s' % filename)
-            else:  # if self.config['dryrun']:
-                print('Create %s' % filename)
-            filetable['added'] += [filename]
-        if isfile(tmpfile):
-            os.remove(tmpfile)
-
         # Create po/ directory.
         filesystem = GLFileSystem(self.config)
         if pobase:
@@ -1365,6 +1338,35 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix
         if isfile(tmpfile):
             os.remove(tmpfile)
 
+        # Create library makefile.
+        # Do this after creating gnulib-comp.m4, because func_emit_lib_Makefile_am
+        # can run 'autoconf -t', which reads gnulib-comp.m4.
+        basename = joinpath(sourcebase, source_makefile_am)
+        tmpfile = self.assistant.tmpfilename(basename)
+        emit, uses_subdirs = self.emitter.lib_Makefile_am(basename,
+                                                          self.moduletable['main'], self.moduletable, self.makefiletable,
+                                                          actioncmd, for_test)
+        if automake_subdir:
+            emit = sp.run([joinpath(DIRS['root'], 'build-aux/prefix-gnulib-mk'), '--from-gnulib-tool',
+                           f'--lib-name={libname}', f'--prefix={sourcebase}/'],
+                          input=emit, text=True, capture_output=True).stdout
+        with codecs.open(tmpfile, 'wb', 'UTF-8') as file:
+            file.write(emit)
+        filename, backup, flag = self.assistant.super_update(basename, tmpfile)
+        if flag == 1:
+            if not self.config['dryrun']:
+                print('Updating %s (backup in %s)' % (filename, backup))
+            else:  # if self.config['dryrun']
+                print('Update %s (backup in %s)' % (filename, backup))
+        elif flag == 2:
+            if not self.config['dryrun']:
+                print('Creating %s' % filename)
+            else:  # if self.config['dryrun']:
+                print('Create %s' % filename)
+            filetable['added'] += [filename]
+        if isfile(tmpfile):
+            os.remove(tmpfile)
+
         # Create tests Makefile.
         if gentests:
             basename = joinpath(testsbase, tests_makefile_am)