]> Savannah Git Hosting - gnulib.git/commitdiff
Align 2011-11-26 patch to 2021-04-11 patch (regression from 2021-04-11).
authorBruno Haible <bruno@clisp.org>
Sun, 13 Jun 2021 20:31:03 +0000 (22:31 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 13 Jun 2021 20:37:08 +0000 (22:37 +0200)
Reported by Paul Eggert.

* m4/unistd_h.m4 (gl_UNISTD_H_REQUIRE_DEFAULTS): Also initialize
GNULIB_UNISTD_H_GETOPT variable.
* modules/getopt-posix (configure.ac): Set GNULIB_UNISTD_H_GETOPT
variable.
* modules/unistd (Makefile.am): Rely on ${gl_include_guard_prefix}
processing done by gnulib-tool since 2021-04-11.
* gnulib-tool: Revert last change.
* pygnulib/GLEmiter.py: Likewise.

ChangeLog
gnulib-tool
m4/unistd_h.m4
modules/getopt-posix
modules/unistd
pygnulib/GLEmiter.py

index 5dd73edebb83c518d405f301754be2db17b1988e..b98de6bf6ad09f0c8fdcedc77eaf086130311c34 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2021-06-13  Bruno Haible  <bruno@clisp.org>
+
+       Align 2011-11-26 patch to 2021-04-11 patch (regression from 2021-04-11).
+       Reported by Paul Eggert.
+       * m4/unistd_h.m4 (gl_UNISTD_H_REQUIRE_DEFAULTS): Also initialize
+       GNULIB_UNISTD_H_GETOPT variable.
+       * modules/getopt-posix (configure.ac): Set GNULIB_UNISTD_H_GETOPT
+       variable.
+       * modules/unistd (Makefile.am): Rely on ${gl_include_guard_prefix}
+       processing done by gnulib-tool since 2021-04-11.
+       * gnulib-tool: Revert last change.
+       * pygnulib/GLEmiter.py: Likewise.
+
 2021-06-13  Paul Eggert  <eggert@cs.ucla.edu>
 
        * lib/stack.h (_GL_STACK_PREFIX): Omit stray semicolon.
index 1ea6580b3769b5e904e7def1a3b41c1581c6317a..63a875d4a26ce98c204c07339681f6890cf79741 100755 (executable)
@@ -3700,7 +3700,7 @@ func_emit_lib_Makefile_am ()
                 -e 's,lib_LTLIBRARIES,lib%_LTLIBRARIES,g' \
                 -e "$sed_eliminate_LDFLAGS" \
                 -e 's,lib_\([A-Z][A-Z]*\),'"${libname}_${libext}"'_\1,g' \
-                -e 's,\$(\(GNULIB_[A-Z]\),$('"${module_indicator_prefix}"'_\1,' \
+                -e 's,\$(GNULIB_,$('"${module_indicator_prefix}"'_GNULIB_,' \
                 -e 's,lib%_LIBRARIES,lib_LIBRARIES,g' \
                 -e 's,lib%_LTLIBRARIES,lib_LTLIBRARIES,g' \
                 -e "$sed_transform_check_PROGRAMS" \
@@ -3714,7 +3714,7 @@ func_emit_lib_Makefile_am ()
           func_get_automake_snippet_unconditional "$module" |
             LC_ALL=C \
             sed -e 's,lib_\([A-Z][A-Z]*\),'"${libname}_${libext}"'_\1,g' \
-                -e 's,\$(\(GNULIB_[A-Z]\),$('"${module_indicator_prefix}"'_\1,'
+                -e 's,\$(GNULIB_,$('"${module_indicator_prefix}"'_GNULIB_,'
         } > "$tmp"/amsnippet2
         # Skip the contents if it's entirely empty.
         if grep '[^     ]' "$tmp"/amsnippet1 "$tmp"/amsnippet2 > /dev/null ; then
@@ -4058,7 +4058,7 @@ func_emit_tests_Makefile_am ()
                 -e 's,lib_LTLIBRARIES,lib%_LTLIBRARIES,g' \
                 -e "$sed_eliminate_LDFLAGS" \
                 -e 's,lib_\([A-Z][A-Z]*\),libtests_a_\1,g' \
-                -e 's,\$(\(GNULIB_[A-Z]\),$('"${module_indicator_prefix}"'_\1,' \
+                -e 's,\$(GNULIB_,$('"${module_indicator_prefix}"'_GNULIB_,' \
                 -e 's,lib%_LIBRARIES,lib_LIBRARIES,g' \
                 -e 's,lib%_LTLIBRARIES,lib_LTLIBRARIES,g' \
                 -e "$sed_transform_check_PROGRAMS" \
@@ -4072,7 +4072,7 @@ func_emit_tests_Makefile_am ()
           func_get_automake_snippet_unconditional "$module" |
             LC_ALL=C \
             sed -e 's,lib_\([A-Z][A-Z]*\),libtests_a_\1,g' \
-                -e 's,\$(\(GNULIB_[A-Z]\),$('"${module_indicator_prefix}"'_\1,'
+                -e 's,\$(GNULIB_,$('"${module_indicator_prefix}"'_GNULIB_,'
         } > "$tmp"/amsnippet2
         # Skip the contents if it's entirely empty.
         if grep '[^     ]' "$tmp"/amsnippet1 "$tmp"/amsnippet2 > /dev/null ; then
index a40a41bc0e890dfb4c8673b44e7ca889859ae443..0ce4ea4511f8f9aaa24441be702abbcf63bb28ee 100644 (file)
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 88
+# unistd_h.m4 serial 89
 dnl Copyright (C) 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -133,6 +133,7 @@ AC_DEFUN([gl_UNISTD_H_REQUIRE_DEFAULTS],
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SYMLINKAT])
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TRUNCATE])
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TTYNAME_R])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_GETOPT])
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_NONBLOCKING])
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_SIGPIPE])
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNLINK])
index cbcfff592e5337e5aa0e87c1efb5d3c693830ead..1a665e13b45ff9a42b625668d2cce884b9f52ba7 100644 (file)
@@ -25,10 +25,10 @@ gl_FUNC_GETOPT_POSIX
 if test $REPLACE_GETOPT = 1; then
   AC_LIBOBJ([getopt])
   AC_LIBOBJ([getopt1])
-  dnl Arrange for unistd.h to include getopt.h.
-  GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT=1
+  dnl Define the substituted variable GNULIB_UNISTD_H_GETOPT to 1.
+  gl_UNISTD_H_REQUIRE_DEFAULTS
+  gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_GETOPT], [1])
 fi
-AC_SUBST([GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT])
 gl_UNISTD_MODULE_INDICATOR([getopt-posix])
 
 Makefile.am:
index 281924f02d8a2b59cd2d80f0a2d6179ff67e0bd8..acc9d860248cf352c9b329465a085536fbd182bb 100644 (file)
@@ -93,7 +93,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \
              -e 's/@''GNULIB_TRUNCATE''@/$(GNULIB_TRUNCATE)/g' \
              -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \
-             -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT)/g' \
+             -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_UNISTD_H_GETOPT)/g' \
              -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \
              -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \
              -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \
index 729862bc179b77c4cbd9cfe0b40831efd9c67c53..e6b5a2a726f672cfeff93a1d694b427d2501363f 100644 (file)
@@ -716,12 +716,8 @@ AC_DEFUN([%V1%_LIBSOURCES], [
                 pattern = compiler('lib_([A-Z][A-Z](?:.*?))', re.S | re.M)
                 amsnippet1 = pattern.sub('%s_%s_\\1' %
                                          (libname, libext), amsnippet1)
-                # FIXME: Use regular expression substitution instead
-                # of this hack.
-                amsnippet1 = amsnippet1.replace('$(GNULIB_$', '$(GNULIB!@#$%')
                 amsnippet1 = amsnippet1.replace(
                     '$(GNULIB_', '$(' + module_indicator_prefix + '_GNULIB_')
-                amsnippet1 = amsnippet1.replace('$(GNULIB!@#$%', '$(GNULIB_$')
                 amsnippet1 = amsnippet1.replace(
                     'lib%_LIBRARIES', 'lib_LIBRARIES')
                 amsnippet1 = amsnippet1.replace(
@@ -745,12 +741,8 @@ AC_DEFUN([%V1%_LIBSOURCES], [
                 pattern = compiler('lib_([A-Z][A-Z](?:.*?))', re.S | re.M)
                 amsnippet2 = pattern.sub('%s_%s_\\1' %
                                          (libname, libext), amsnippet2)
-                # FIXME: Use regular expression substitution instead
-                # of this hack.
-                amsnippet2 = amsnippet2.replace('$(GNULIB_$', '$(GNULIB!@#$%')
                 amsnippet2 = amsnippet2.replace(
                     '$(GNULIB_', '$(' + module_indicator_prefix + '_GNULIB_')
-                amsnippet1 = amsnippet2.replace('$(GNULIB!@#$%', '$(GNULIB_$')
                 if type(amsnippet1) is bytes:
                     amsnippet1 = amsnippet1.decode(ENCS['default'])
                 if type(amsnippet2) is bytes:
@@ -1019,12 +1011,8 @@ AC_DEFUN([%V1%_LIBSOURCES], [
                     snippet = pattern.sub('', snippet)
                 pattern = compiler('lib_([A-Z][A-Z](?:.*?))', re.S | re.M)
                 snippet = pattern.sub('libtests_a_\\1', snippet)
-                # FIXME: Use regular expression substitution instead
-                # of this hack.
-                snippet = snippet.replace('$(GNULIB_$', '$(GNULIB!@#$%')
                 snippet = snippet.replace(
                     '$(GNULIB_', '$(' + module_indicator_prefix + '_GNULIB_')
-                snippet = snippet.replace('$(GNULIB!@#$%', '$(GNULIB_$')
                 snippet = snippet.replace('lib%_LIBRARIES', 'lib_LIBRARIES')
                 snippet = snippet.replace(
                     'lib%_LTLIBRARIES', 'lib_LTLIBRARIES')