]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* acgeneral.m4 (AC_CACHE_SAVE): Use the `clear' trick to work
authorAkim Demaille <akim@epita.fr>
Wed, 29 Nov 2000 17:57:55 +0000 (17:57 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 29 Nov 2000 17:57:55 +0000 (17:57 +0000)
around broken seds.
(_AC_OUTPUT_HEADERS, _AC_OUTPUT_FILES): Rename the sed labels to
match the Autoconf documentation.

ChangeLog
acgeneral.m4
lib/autoconf/general.m4

index f52aca5f296c1637006f9001ec5c2551e54a559c..7d5eed633550b9b53131a7fda9f561f07b950d45 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2000-11-29  Akim Demaille  <akim@epita.fr>
+
+       * acgeneral.m4 (AC_CACHE_SAVE): Use the `clear' trick to work
+       around broken seds.
+       (_AC_OUTPUT_HEADERS, _AC_OUTPUT_FILES): Rename the sed labels to
+       match the Autoconf documentation.
+
 2000-11-29  Akim Demaille  <akim@epita.fr>
 
        * doc/autoconf.texi (Shell Substitutions): More on the variations
index c98f026b86a3e988b7eb89d6a1e2f6477b939892..4feb84a7cad65613687eb2398f785df135f6592a 100644 (file)
@@ -1992,10 +1992,12 @@ _ACEOF
 
 _AC_CACHE_DUMP() |
   sed ['
+     t clear
+     : clear
      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
-     t cleanup
+     t end
      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
-     : cleanup'] >>confcache
+     : end'] >>confcache
 if cmp -s $cache_file confcache; then :; else
   if test -w $cache_file; then
     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
@@ -4021,15 +4023,15 @@ m4_define([AC_OUTPUT_MAKE_DEFS],
 # Protect against Makefile macro expansion.
 #
 # If the first sed substitution is executed (which looks for macros that
-# take arguments), then we branch to the cleanup section.  Otherwise,
+# take arguments), then we branch to the quote section.  Otherwise,
 # look for a macro that doesn't take arguments.
 cat >confdef2opt.sed <<\EOF
 t clear
 : clear
 s,^[   ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\),-D\1=\2,g
-t cleanup
+t quote
 s,^[   ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\),-D\1=\2,g
-: cleanup
+: quote
 s,[    `~#$^&*(){}\\|;'"<>?],\\&,g
 s,\[,\\&,g
 s,\],\\&,g
@@ -4362,9 +4364,8 @@ rm -f conftest.defines conftest.undefs
 # Using a here document instead of a string reduces the quoting nightmare.
 # Putting comments in sed scripts is not portable.
 #
-# `cleanup' is used to avoid that the second main sed command (meant for
-# 0-ary CPP macros) applies to n-ary macro definitions.  So we use
-# `t cleanup' to jump over the second main sed command when it succeeded.
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
 # See the Autoconf documentation for `clear'.
 cat >confdef2sed.sed <<\EOF
 dnl Double quote for `[ ]' and `define'.
@@ -4373,9 +4374,9 @@ s,[\\$`],\\&,g
 t clear
 : clear
 s,^[   ]*#[    ]*define[       ][      ]*\(\([^        (][^    (]*\)([^)]*)\)[         ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
-t cleanup
+t end
 s,^[   ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
-: cleanup]
+: end]
 EOF
 # If some macros were called several times there might be several times
 # the same #defines, which is useless.  Nevertheless, we may not want to
index c98f026b86a3e988b7eb89d6a1e2f6477b939892..4feb84a7cad65613687eb2398f785df135f6592a 100644 (file)
@@ -1992,10 +1992,12 @@ _ACEOF
 
 _AC_CACHE_DUMP() |
   sed ['
+     t clear
+     : clear
      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
-     t cleanup
+     t end
      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
-     : cleanup'] >>confcache
+     : end'] >>confcache
 if cmp -s $cache_file confcache; then :; else
   if test -w $cache_file; then
     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
@@ -4021,15 +4023,15 @@ m4_define([AC_OUTPUT_MAKE_DEFS],
 # Protect against Makefile macro expansion.
 #
 # If the first sed substitution is executed (which looks for macros that
-# take arguments), then we branch to the cleanup section.  Otherwise,
+# take arguments), then we branch to the quote section.  Otherwise,
 # look for a macro that doesn't take arguments.
 cat >confdef2opt.sed <<\EOF
 t clear
 : clear
 s,^[   ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\),-D\1=\2,g
-t cleanup
+t quote
 s,^[   ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\),-D\1=\2,g
-: cleanup
+: quote
 s,[    `~#$^&*(){}\\|;'"<>?],\\&,g
 s,\[,\\&,g
 s,\],\\&,g
@@ -4362,9 +4364,8 @@ rm -f conftest.defines conftest.undefs
 # Using a here document instead of a string reduces the quoting nightmare.
 # Putting comments in sed scripts is not portable.
 #
-# `cleanup' is used to avoid that the second main sed command (meant for
-# 0-ary CPP macros) applies to n-ary macro definitions.  So we use
-# `t cleanup' to jump over the second main sed command when it succeeded.
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
 # See the Autoconf documentation for `clear'.
 cat >confdef2sed.sed <<\EOF
 dnl Double quote for `[ ]' and `define'.
@@ -4373,9 +4374,9 @@ s,[\\$`],\\&,g
 t clear
 : clear
 s,^[   ]*#[    ]*define[       ][      ]*\(\([^        (][^    (]*\)([^)]*)\)[         ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
-t cleanup
+t end
 s,^[   ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
-: cleanup]
+: end]
 EOF
 # If some macros were called several times there might be several times
 # the same #defines, which is useless.  Nevertheless, we may not want to