>From 4bccc91c6bd9d73d3473d909023995e59119152e Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 29 Jul 2022 22:58:27 +0200 Subject: [PATCH 4/5] gnulib-tool.py: Follow gnulib-tool changes, part 16. Follow gnulib-tool change 2015-09-25 Pavel Raiskup gnulib-common.m4: fix gl_PROG_AR_RANLIB/AM_PROG_AR clash * pygnulib/GLImport.py (GLImport.gnulib_comp): Put the gl_USE_SYSTEM_EXTENSIONS right before gl_PROG_AR_RANLIB into gnulib-comp.m4 (if the 'extensions' module is used). --- ChangeLog | 8 ++++++++ gnulib-tool.py.TODO | 28 ---------------------------- pygnulib/GLImport.py | 6 ++++-- 3 files changed, 12 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index 01d8df2e13..1ddf2822ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2022-07-29 Bruno Haible + gnulib-tool.py: Follow gnulib-tool changes, part 16. + Follow gnulib-tool change + 2015-09-25 Pavel Raiskup + gnulib-common.m4: fix gl_PROG_AR_RANLIB/AM_PROG_AR clash + * pygnulib/GLImport.py (GLImport.gnulib_comp): Put the + gl_USE_SYSTEM_EXTENSIONS right before gl_PROG_AR_RANLIB into + gnulib-comp.m4 (if the 'extensions' module is used). + gnulib-tool.py: Modernize coding style. * pygnulib/*.py: Remove parentheses around return value expressions. diff --git a/gnulib-tool.py.TODO b/gnulib-tool.py.TODO index 7017d15a05..bcb811b5df 100644 --- a/gnulib-tool.py.TODO +++ b/gnulib-tool.py.TODO @@ -1134,34 +1134,6 @@ Date: Tue Oct 6 13:20:05 2015 +0200 (func_import, func_create_testdir): All dumps of gl_PROG_AR_RANLIB replaced with func_emit_pre_early_macros call. -commit f8fe25fab60e3c687a12446984bb475342956bb8 -Author: Pavel Raiskup -Date: Fri Sep 25 11:25:03 2015 -0700 - - gnulib-common.m4: fix gl_PROG_AR_RANLIB/AM_PROG_AR clash - - The gl_PROG_AR_RANLIB (it is always called by gl_EARLY) sets AR - and ARFLAGS variables. Doing this unconditionally could break - later Automake's AM_PROG_AR invocation (at least it's - AC_CHECK_TOOLS call to detect correct 'ar' binary). - - Original purpose of the gl_PROG_AR_RANLIB was only to handle the - Amsterdam Compiler Kit, so make the previous code to have effects - only on ACK, and rather automatically call the Automake's - AM_PROG_AR as soon as possible to decide other cases. - - References: - http://lists.gnu.org/archive/html/bug-gnulib/2015-07/msg00001.html - - * m4/gnulib-common.m4 (gl_PROG_AR_RANLIB): AC_BEFORE AM_PROG_AR. - Set the AR/ARFLAGS to ACK defaults OR call AM_PROG_AR. If neither - is possible, keep setting AR/ARFLAGS to reasonable defaults. - * gnulib-tool (func_import): Put the gl_USE_SYSTEM_EXTENSIONS - right before gl_PROG_AR_RANLIB into gnulib-comp.m4 (if the - 'extensions' module is used. - * modules/extensions (configure.ac-early): Remove as this snippet - is added to gnulib-comp.m4 earlier anyway. - commit 9bdf6c8a0cdeb13c12e4b65dee9538c5468dbe1d Author: Bruno Haible Date: Sun Aug 19 14:06:50 2012 +0200 diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py index 10ad069271..c51b5036df 100644 --- a/pygnulib/GLImport.py +++ b/pygnulib/GLImport.py @@ -598,8 +598,10 @@ AC_DEFUN([%s_EARLY], m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace m4_pattern_allow([^gl_ES$])dnl a valid locale name m4_pattern_allow([^gl_LIBOBJS$])dnl a variable - m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable - AC_REQUIRE([gl_PROG_AR_RANLIB])\n''' % (configure_ac, macro_prefix) + m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable\n''' % (configure_ac, macro_prefix) + if any(str(module) == 'extensions' for module in moduletable['final']): + emit += ' AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])\n' + emit += ' AC_REQUIRE([gl_PROG_AR_RANLIB])\n' uses_subdirs = False for module in moduletable['main']: # Test whether there are some source files in subdirectories. -- 2.34.1