diff options
-rw-r--r-- | ChangeLog | 24 | ||||
-rwxr-xr-x | gnulib-tool.sh | 47 | ||||
-rw-r--r-- | pygnulib/GLEmiter.py | 38 | ||||
-rw-r--r-- | pygnulib/GLImport.py | 22 | ||||
-rw-r--r-- | pygnulib/GLTestDir.py | 26 | ||||
-rw-r--r-- | pygnulib/constants.py | 6 |
6 files changed, 58 insertions, 105 deletions
@@ -2,2 +2,26 @@ + gnulib-tool: Drop workarounds for Automake < 1.14. + Reported by Collin Funk in + <https://lists.gnu.org/archive/html/bug-gnulib/2024-03/msg00384.html>. + * gnulib-tool.sh (func_emit_lib_Makefile_am): Emit pkgdata_DATA + initialization always. + (func_emit_tests_Makefile_am): Likewise. + (func_import): Don't emit 'AC_REQUIRE([AM_PROG_CC_C_O])' into + gnulib-comp.m4. + (func_create_testdir): Don't emit AM_PROG_CC_C_O into configure.ac. + Bump required Automake version to 1.14. + (func_create_megatestdir): Bump required Automake version to 1.14. + * pygnulib/constants.py: Update comments. + * pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am): Emit pkgdata_DATA + initialization always. Don't return uses_subdirs. + (GLEmiter.tests_Makefile_am): Likewise. + * pygnulib/GLImport.py (GLImport.gnulib_comp): Don't emit + 'AC_REQUIRE([AM_PROG_CC_C_O])'. + (GLImport.execute): Update. + * pygnulib/GLTestDir.py (GLTestDir.execute): Don't emit AM_PROG_CC_C_O + into configure.ac. Bump required Automake version to 1.14. + (GLMegaTestDir.execute): Bump required Automake version to 1.14. + +2024-03-28 Bruno Haible <bruno@clisp.org> + pthread-h: Fix override of pthread_spinlock_t with non-GNU compilers. diff --git a/gnulib-tool.sh b/gnulib-tool.sh index ba9ee83e74..e0c8cfafbd 100755 --- a/gnulib-tool.sh +++ b/gnulib-tool.sh @@ -50,3 +50,3 @@ IFS=" "" $nl" -# You can set AUTOCONFPATH to empty if autoconf 2.64 is already in your PATH. +# You can set AUTOCONFPATH to empty if autoconf ≥ 2.64 is already in your PATH. AUTOCONFPATH= @@ -59,6 +59,6 @@ AUTOCONFPATH= -# You can set AUTOMAKEPATH to empty if automake 1.11 is already in your PATH. +# You can set AUTOMAKEPATH to empty if automake ≥ 1.14 is already in your PATH. AUTOMAKEPATH= -# You can set GETTEXTPATH to empty if autopoint 0.15 is already in your PATH. +# You can set GETTEXTPATH to empty if autopoint ≥ 0.15 is already in your PATH. GETTEXTPATH= @@ -3765,4 +3765,2 @@ func_update_file () # list of edits to be done to Makefile.am variables -# Output: -# - uses_subdirs nonempty if object files in subdirs exist func_emit_lib_Makefile_am () @@ -3914,11 +3912,3 @@ func_emit_lib_Makefile_am () echo "noinst_LTLIBRARIES =" - # Automake versions < 1.11.4 create an empty pkgdatadir at - # installation time if you specify pkgdata_DATA to empty. - # See automake bugs #10997 and #11030: - # * https://debbugs.gnu.org/10997 - # * https://debbugs.gnu.org/11030 - # So we need this workaround. - if grep '^pkgdata_DATA *+=' "$tmp"/allsnippets > /dev/null; then - echo "pkgdata_DATA =" - fi + echo "pkgdata_DATA =" echo "EXTRA_DIST =" @@ -4163,4 +4153,2 @@ func_emit_po_POTFILES_in () # list of edits to be done to Makefile.am variables -# Output: -# - uses_subdirs nonempty if object files in subdirs exist func_emit_tests_Makefile_am () @@ -4334,11 +4322,3 @@ func_emit_tests_Makefile_am () fi - # Automake versions < 1.11.4 create an empty pkgdatadir at - # installation time if you specify pkgdata_DATA to empty. - # See automake bugs #10997 and #11030: - # * https://debbugs.gnu.org/10997 - # * https://debbugs.gnu.org/11030 - # So we need this workaround. - if grep '^pkgdata_DATA *+=' "$tmp"/main_snippets "$tmp"/longrunning_snippets > /dev/null; then - echo "pkgdata_DATA =" - fi + echo "pkgdata_DATA =" echo "EXTRA_DIST =" @@ -6029,5 +6009,2 @@ s,//*$,/,' - if ! $gnu_make && test -n "$uses_subdirs"; then - echo " AC_REQUIRE([AM_PROG_CC_C_O])" - fi for module in $final_modules; do @@ -6684,3 +6661,2 @@ func_create_testdir () func_emit_lib_Makefile_am > "$testdir/$sourcebase/Makefile.am" - any_uses_subdirs="$uses_subdirs" @@ -6726,3 +6702,2 @@ func_create_testdir () func_emit_tests_Makefile_am "" > "$testdir/$testsbase/Makefile.am" - any_uses_subdirs="$any_uses_subdirs$uses_subdirs" # Create $testsbase/configure.ac. @@ -6741,6 +6716,2 @@ func_create_testdir () - if test -n "$uses_subdirs"; then - echo "AM_PROG_CC_C_O" - echo - fi for module in $modules; do @@ -6824,3 +6795,3 @@ func_create_testdir () echo - echo "AUTOMAKE_OPTIONS = 1.11 foreign" + echo "AUTOMAKE_OPTIONS = 1.14 foreign" echo @@ -6856,6 +6827,2 @@ func_create_testdir () - if test -n "$any_uses_subdirs"; then - echo "AM_PROG_CC_C_O" - echo - fi for module in $final_modules; do @@ -7154,3 +7121,3 @@ func_create_megatestdir () echo - echo "AUTOMAKE_OPTIONS = 1.11 foreign" + echo "AUTOMAKE_OPTIONS = 1.14 foreign" echo diff --git a/pygnulib/GLEmiter.py b/pygnulib/GLEmiter.py index efde78823d..0bfbfe10e3 100644 --- a/pygnulib/GLEmiter.py +++ b/pygnulib/GLEmiter.py @@ -700,5 +700,4 @@ AC_DEFUN([%V1%_LIBSOURCES], [ def lib_Makefile_am(self, destfile: str, modules: list[GLModule], moduletable: GLModuleTable, - makefiletable: GLMakefileTable, actioncmd: str, for_test: bool) -> tuple[str, bool]: - '''Emit the contents of the library Makefile. Returns str and a bool - variable which shows if subdirectories are used. + makefiletable: GLMakefileTable, actioncmd: str, for_test: bool) -> str: + '''Emit the contents of the library Makefile. Returns it as a string. GLConfig: localpath, sourcebase, libname, pobase, auxdir, makefile_name, libtool, @@ -867,11 +866,3 @@ AC_DEFUN([%V1%_LIBSOURCES], [ emit += 'noinst_LTLIBRARIES =\n' - # Automake versions < 1.11.4 create an empty pkgdatadir at - # installation time if you specify pkgdata_DATA to empty. - # See automake bugs #10997 and #11030: - # * https://debbugs.gnu.org/10997 - # * https://debbugs.gnu.org/11030 - # So we need this workaround. - pattern = re.compile(r'^pkgdata_DATA *\+=', re.M) - if pattern.findall(allsnippets): - emit += 'pkgdata_DATA =\n' + emit += 'pkgdata_DATA =\n' emit += 'EXTRA_DIST =\n' @@ -1005,9 +996,7 @@ AC_DEFUN([%V1%_LIBSOURCES], [ emit += 'maintainer-clean-local: distclean-gnulib-libobjs\n' - result = tuple([emit, uses_subdirs]) - return result + return emit def tests_Makefile_am(self, destfile: str, modules: list[GLModule], moduletable: GLModuleTable, - makefiletable: GLMakefileTable, witness_macro: str, for_test: bool) -> tuple[str, bool]: - '''Emit the contents of the tests Makefile. Returns str and a bool variable - which shows if subdirectories are used. + makefiletable: GLMakefileTable, witness_macro: str, for_test: bool) -> str: + '''Emit the contents of the tests Makefile. Returns it as a string. GLConfig: localpath, modules, libname, auxdir, makefile_name, libtool, @@ -1198,13 +1187,3 @@ AC_DEFUN([%V1%_LIBSOURCES], [ emit += 'check_LIBRARIES = libtests.a\n' - - # Automake versions < 1.11.4 create an empty pkgdatadir at - # installation time if you specify pkgdata_DATA to empty. - # See automake bugs #10997 and #11030: - # * https://debbugs.gnu.org/10997 - # * https://debbugs.gnu.org/11030 - # So we need this workaround. - pattern = re.compile(r'^pkgdata_DATA *\+=', re.M) - if pattern.findall(main_snippets) or pattern.findall(longrun_snippets): - emit += 'pkgdata_DATA =\n' - + emit += 'pkgdata_DATA =\n' emit += 'EXTRA_DIST =\n' @@ -1329,3 +1308,2 @@ AC_DEFUN([%V1%_LIBSOURCES], [ emit += '\t:\n' - result = tuple([emit, uses_subdirs]) - return result + return emit diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py index 07be6742a1..5137f07e37 100644 --- a/pygnulib/GLImport.py +++ b/pygnulib/GLImport.py @@ -650,12 +650,2 @@ AC_DEFUN([%s_EARLY], emit += self.emitter.preEarlyMacros(True, ' ', moduletable['final']) - uses_subdirs = False - for module in moduletable['main']: - # Test whether there are some source files in subdirectories. - for file in module.getFiles(): - if (file.startswith('lib/') and file.endswith('.c') - and file.count('/') > 1): - uses_subdirs = True - break - if not gnu_make and uses_subdirs: - emit += ' AC_REQUIRE([AM_PROG_CC_C_O])\n' for module in moduletable['final']: @@ -1332,5 +1322,5 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix tmpfile = self.assistant.tmpfilename(basename) - emit, uses_subdirs = self.emitter.lib_Makefile_am(basename, - self.moduletable['main'], self.moduletable, self.makefiletable, - actioncmd, for_test) + emit = self.emitter.lib_Makefile_am(basename, + self.moduletable['main'], self.moduletable, self.makefiletable, + actioncmd, for_test) if automake_subdir: @@ -1360,5 +1350,5 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix tmpfile = self.assistant.tmpfilename(basename) - emit, uses_subdirs = self.emitter.tests_Makefile_am(basename, - self.moduletable['tests'], self.moduletable, self.makefiletable, - '%stests_WITNESS' % macro_prefix, for_test) + emit = self.emitter.tests_Makefile_am(basename, + self.moduletable['tests'], self.moduletable, self.makefiletable, + '%stests_WITNESS' % macro_prefix, for_test) with codecs.open(tmpfile, 'wb', 'UTF-8') as file: diff --git a/pygnulib/GLTestDir.py b/pygnulib/GLTestDir.py index aa9a6b82ea..57fbef7b06 100644 --- a/pygnulib/GLTestDir.py +++ b/pygnulib/GLTestDir.py @@ -398,10 +398,9 @@ class GLTestDir(object): if single_configure: - emit, uses_subdirs = self.emitter.lib_Makefile_am(destfile, main_modules, - moduletable, self.makefiletable, '', for_test) + emit = self.emitter.lib_Makefile_am(destfile, main_modules, + moduletable, self.makefiletable, '', for_test) else: # if not single_configure - emit, uses_subdirs = self.emitter.lib_Makefile_am(destfile, modules, - moduletable, self.makefiletable, '', for_test) + emit = self.emitter.lib_Makefile_am(destfile, modules, + moduletable, self.makefiletable, '', for_test) with codecs.open(destfile, 'wb', 'UTF-8') as file: file.write(emit) - any_uses_subdirs = uses_subdirs @@ -435,4 +434,4 @@ class GLTestDir(object): witness_macro = '%stests_WITNESS' % macro_prefix - emit, uses_subdirs = self.emitter.tests_Makefile_am(destfile, tests_modules, moduletable, - self.makefiletable, witness_macro, for_test) + emit = self.emitter.tests_Makefile_am(destfile, tests_modules, moduletable, + self.makefiletable, witness_macro, for_test) with codecs.open(destfile, 'wb', 'UTF-8') as file: @@ -444,4 +443,4 @@ class GLTestDir(object): self.config.setLibtests(False) - emit, uses_subdirs = self.emitter.tests_Makefile_am(destfile, modules, moduletable, - self.makefiletable, '', for_test) + emit = self.emitter.tests_Makefile_am(destfile, modules, moduletable, + self.makefiletable, '', for_test) with codecs.open(destfile, 'wb', 'UTF-8') as file: @@ -464,4 +463,2 @@ class GLTestDir(object): emit += self.emitter.preEarlyMacros(False, '', modules) - if uses_subdirs: - emit += 'AM_PROG_CC_C_O\n\n' snippets = list() @@ -554,3 +551,3 @@ class GLTestDir(object): emit = '## Process this file with automake to produce Makefile.in.\n\n' - emit += 'AUTOMAKE_OPTIONS = 1.11 foreign\n\n' + emit += 'AUTOMAKE_OPTIONS = 1.14 foreign\n\n' emit += 'SUBDIRS = %s\n\n' % ' '.join(subdirs) @@ -581,5 +578,2 @@ class GLTestDir(object): emit += self.emitter.preEarlyMacros(False, '', modules) - if any_uses_subdirs: - emit += 'AM_PROG_CC_C_O\n' - emit += '\n' snippets = list() @@ -1014,3 +1008,3 @@ class GLMegaTestDir(object): emit = '## Process this file with automake to produce Makefile.in.\n\n' - emit += 'AUTOMAKE_OPTIONS = 1.11 foreign\n\n' + emit += 'AUTOMAKE_OPTIONS = 1.14 foreign\n\n' emit += 'SUBDIRS = %s\n\n' % ' '.join(megasubdirs) diff --git a/pygnulib/constants.py b/pygnulib/constants.py index dd20624fe8..16a60d1d3d 100644 --- a/pygnulib/constants.py +++ b/pygnulib/constants.py @@ -127,7 +127,7 @@ TESTS = \ DEFAULT_AUTOCONF_MINVERSION = 2.64 -# You can set AUTOCONFPATH to empty if autoconf 2.64 is already in your PATH +# You can set AUTOCONFPATH to empty if autoconf ≥ 2.64 is already in your PATH AUTOCONFPATH = '' -# You can set AUTOMAKEPATH to empty if automake 1.11 is already in your PATH +# You can set AUTOMAKEPATH to empty if automake ≥ 1.14 is already in your PATH AUTOMAKEPATH = '' -# You can set GETTEXTPATH to empty if autopoint 0.15 is already in your PATH +# You can set GETTEXTPATH to empty if autopoint ≥ 0.15 is already in your PATH GETTEXTPATH = '' |