]> Savannah Git Hosting - gnulib.git/commitdiff
getopt-gnu: port back to Solaris 10
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 13 Jun 2021 17:31:33 +0000 (10:31 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 13 Jun 2021 17:38:21 +0000 (10:38 -0700)
* gnulib-tool (func_emit_lib_Makefile_am)
(func_emit_tests_Makefile_am): Don’t substitute things like
$(GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT),
as this mishandles unistd and getopt-gnu, which breaks
‘make check’ on Solaris 10 with getopt-gnu.
* pygnulib/GLEmiter.py (lib_Makefile_am, tests_Makefile_am):
Likewise, albeit hackier since I did not test this and
so went with a trivial hack instead.

ChangeLog
gnulib-tool
pygnulib/GLEmiter.py

index b48760c6e75822aec353298152ec98db3302e8b3..084c43017573493f37884fee93be680c999f04e2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2021-06-13  Paul Eggert  <eggert@cs.ucla.edu>
+
+       getopt-gnu: port back to Solaris 10
+       * gnulib-tool (func_emit_lib_Makefile_am)
+       (func_emit_tests_Makefile_am): Don’t substitute things like
+       $(GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT),
+       as this mishandles unistd and getopt-gnu, which breaks
+       ‘make check’ on Solaris 10 with getopt-gnu.
+       * pygnulib/GLEmiter.py (lib_Makefile_am, tests_Makefile_am):
+       Likewise, albeit hackier since I did not test this and
+       so went with a trivial hack instead.
+
 2021-06-13  Bruno Haible  <bruno@clisp.org>
 
        ialloc: Put appropriate license notice in source files.
index 63a875d4a26ce98c204c07339681f6890cf79741..1ea6580b3769b5e904e7def1a3b41c1581c6317a 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_,$('"${module_indicator_prefix}"'_GNULIB_,' \
+                -e 's,\$(\(GNULIB_[A-Z]\),$('"${module_indicator_prefix}"'_\1,' \
                 -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_,$('"${module_indicator_prefix}"'_GNULIB_,'
+                -e 's,\$(\(GNULIB_[A-Z]\),$('"${module_indicator_prefix}"'_\1,'
         } > "$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_,$('"${module_indicator_prefix}"'_GNULIB_,' \
+                -e 's,\$(\(GNULIB_[A-Z]\),$('"${module_indicator_prefix}"'_\1,' \
                 -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_,$('"${module_indicator_prefix}"'_GNULIB_,'
+                -e 's,\$(\(GNULIB_[A-Z]\),$('"${module_indicator_prefix}"'_\1,'
         } > "$tmp"/amsnippet2
         # Skip the contents if it's entirely empty.
         if grep '[^     ]' "$tmp"/amsnippet1 "$tmp"/amsnippet2 > /dev/null ; then
index e6b5a2a726f672cfeff93a1d694b427d2501363f..729862bc179b77c4cbd9cfe0b40831efd9c67c53 100644 (file)
@@ -716,8 +716,12 @@ 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(
@@ -741,8 +745,12 @@ 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:
@@ -1011,8 +1019,12 @@ 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')