[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: Renaming sed labels and fixing AC_CACHE_SAVE
From: |
Akim Demaille |
Subject: |
FYI: Renaming sed labels and fixing AC_CACHE_SAVE |
Date: |
29 Nov 2000 19:02:33 +0100 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands) |
Index: ChangeLog
from Akim Demaille <address@hidden>
* 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.
Index: acgeneral.m4
===================================================================
RCS file: /cvs/autoconf/acgeneral.m4,v
retrieving revision 1.639
diff -u -u -r1.639 acgeneral.m4
--- acgeneral.m4 2000/11/29 17:43:01 1.639
+++ acgeneral.m4 2000/11/29 17:55:57
@@ -1992,10 +1992,12 @@
_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 @@
# 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 @@
# 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 @@
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: Renaming sed labels and fixing AC_CACHE_SAVE,
Akim Demaille <=