autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Autoheader @ interpolation


From: Akim Demaille
Subject: Re: Autoheader @ interpolation
Date: 22 Oct 2002 10:19:58 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter)

>>>>> "Carlos" == Carlos Velasco <address@hidden> writes:

Carlos> Hi Akim, try to do it this way:

Carlos> AH_TOP([Email: address@hidden)

Carlos> In the tests below you use the "@" with space before.

Ah!  Stupid me :*(

Thanks.  I'm installing this:

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * lib/m4sugar/m4sh.m4 (_AS_QUOTE): The warning about quoted
        characters is a syntax warning now.
        (_AS_QUOTE): Accept $2 as list of characters to quote.
        * lib/autoconf/autoheader.m4 (AH_VERBATIM, _AH_VERBATIM_OLD):
        Quote for Perl, not sh.
        * bin/autoheader.in: When $debug, report the file which is
        `do'ne.
        * tests/tools.at (autom4te, autoheader): Exercise @bar, not merely
        `@', to tickle Perl's lists.
        Reported by Carlos Velasco.

Index: THANKS
===================================================================
RCS file: /cvsroot/autoconf/autoconf/THANKS,v
retrieving revision 1.98
diff -u -u -r1.98 THANKS
--- THANKS 17 Oct 2002 10:34:09 -0000 1.98
+++ THANKS 22 Oct 2002 08:18:55 -0000
@@ -30,6 +30,7 @@
 Bram Moolenaar              address@hidden
 Bruno Haible                address@hidden
 Carl Edman                  address@hidden
+Carlos Velasco              address@hidden
 Chad R. Larson              address@hidden
 Chris P. Ross               address@hidden
 Chris Provenzano            address@hidden
Index: bin/autoheader.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/bin/autoheader.in,v
retrieving revision 1.124
diff -u -u -r1.124 autoheader.in
--- bin/autoheader.in 16 Oct 2002 06:38:50 -0000 1.124
+++ bin/autoheader.in 22 Oct 2002 08:18:55 -0000
@@ -176,6 +176,7 @@
         . " $ARGV[0] >$tmp/traces.pl");
 
 local (%verbatim, %symbol);
+debug "$me: \`do'ing $tmp/traces.pl:\n" . `sed 's/^/| /' $tmp/traces.pl`;
 do "$tmp/traces.pl";
 warn "couldn't parse $tmp/traces.pl: $@" if $@;
 error "error: AC_CONFIG_HEADERS not found in $ARGV[0]"
Index: lib/autoconf/autoheader.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/autoheader.m4,v
retrieving revision 1.2
diff -u -u -r1.2 autoheader.m4
--- lib/autoconf/autoheader.m4 20 Apr 2002 06:09:02 -0000 1.2
+++ lib/autoconf/autoheader.m4 22 Oct 2002 08:18:55 -0000
@@ -64,18 +64,22 @@
 # may occur if there is AC_CHECK_FUNCS($my_func)), issue an autoheader
 # TEMPLATE associated to the KEY.  Otherwise, do nothing.  TEMPLATE is
 # output as is, with no formatting.
+#
+# Quote for Perl "" strings, which are those used by Autoheader.
 m4_define([AH_VERBATIM],
 [AS_LITERAL_IF([$1],
-               [AH_OUTPUT([$1], AS_ESCAPE([[$2]]))])
+               [AH_OUTPUT([$1], AS_ESCAPE([[$2]], [\"@$]))])
 ])
 
 
 # _AH_VERBATIM_OLD(KEY, TEMPLATE)
 # -------------------------------
 # Same as above, but with bugward compatibility.
+#
+# Quote for Perl "" strings, which are those used by Autoheader.
 m4_define([_AH_VERBATIM_OLD],
 [AS_LITERAL_IF([$1],
-               [AH_OUTPUT([$1], _AS_QUOTE([[$2]]))])
+               [AH_OUTPUT([$1], _AS_QUOTE([[$2]], [\"@$]))])
 ])
 
 
Index: lib/m4sugar/m4sh.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/m4sugar/m4sh.m4,v
retrieving revision 1.89
diff -u -u -r1.89 m4sh.m4
--- lib/m4sugar/m4sh.m4 11 Oct 2002 09:49:31 -0000 1.89
+++ lib/m4sugar/m4sh.m4 22 Oct 2002 08:18:55 -0000
@@ -335,18 +335,15 @@
 [echo "$1" >&m4_default([$2], [AS_MESSAGE_FD])])
 
 
-# _AS_QUOTE(STRING)
-# -----------------
+# _AS_QUOTE(STRING, [CHARS = `"])
+# -------------------------------
 # If there are quoted (via backslash) backquotes do nothing, else
 # backslash all the quotes.
-# FIXME: In a distant future (2.51 or +), this warning should be
-# classified as `syntax'.  It is classified as `obsolete' to ease
-# the transition (for Libtool for instance).
 m4_define([_AS_QUOTE],
 [_AS_QUOTE_IFELSE([$1],
-                  [AS_ESCAPE([$1], [`""])],
-                  [m4_warn([obsolete],
-           [back quotes and double quotes should not be escaped in: $1])dnl
+                  [AS_ESCAPE([$1], m4_default([$2], [`""]))],
+                  [m4_warn([syntax],
+           [back quotes and double quotes must not be escaped in: $1])dnl
 $1])])
 
 
Index: tests/tools.at
===================================================================
RCS file: /cvsroot/autoconf/autoconf/tests/tools.at,v
retrieving revision 1.68
diff -u -u -r1.68 tools.at
--- tests/tools.at 18 Oct 2002 15:20:46 -0000 1.68
+++ tests/tools.at 22 Oct 2002 08:18:56 -0000
@@ -166,7 +166,7 @@
 TRACE2
 
 # With arguments, single line.
-TRACE1(foo, bar, baz)
+TRACE1(foo, @bar, @baz)
 TRACE1(foo, TRACE1(bar, baz))
 TRACE1(foo, active, baz)
 TRACE1(foo, [active], TRACE1(active, [active]))
@@ -183,8 +183,8 @@
 [[configure.ac:6:TRACE1:
 configure.ac:6:TRACE2:
 configure.ac:7:TRACE2:
-configure.ac:10:TRACE1:foo:bar:baz
-configure.ac:10:TRACE2:bar:baz
+configure.ac:10:TRACE1:foo:@bar:@baz
+configure.ac:10:TRACE2:@bar:@baz
 configure.ac:11:TRACE1:bar:baz
 configure.ac:11:TRACE2:baz
 configure.ac:11:TRACE1:foo::baz
@@ -205,7 +205,7 @@
 [[
 [], [], [].
 
-[foo], [bar], [baz].
+[foo], address@hidden, address@hidden
 
 [bar], [baz], [].
 
@@ -226,7 +226,7 @@
 AT_CHECK_AUTOCONF([-t TRACE2:'${)===(}@'], 0,
 [[[]
 []
-[bar])===([baz]
address@hidden)===(address@hidden
 [baz]
 [])===([baz]
 [ACTIVE])===([baz]
@@ -458,14 +458,14 @@
 AC_CONFIG_HEADERS(config.h:config.hin)
 AH_TOP([Top1 from configure.ac.])
 AH_TOP([Top2 from configure.ac.])
-AH_TOP([The Cat in a @.])
+AH_TOP([The Cat in a address@hidden)
 AH_VERBATIM([Middle], [Middle from configure.ac.])
-AH_VERBATIM([Mouse],  [The Mouse in a @.])
+AH_VERBATIM([Mouse],  [The Mouse in a address@hidden)
 AH_BOTTOM([Bottom1 from configure.ac.])
 AH_BOTTOM([Bottom2 from configure.ac.])
-AH_BOTTOM([The Dog in a @.])
+AH_BOTTOM([The Dog in a address@hidden)
 
-AC_DEFINE([ANT], address@hidden, [The Ant in a @.])
+AC_DEFINE([ANT], address@hidden, [The Ant in a address@hidden)
 ]])
 
 
@@ -484,14 +484,14 @@
 
 Top2 from configure.ac.
 
-The Cat in a @.
+The Cat in a address@hidden
 
-/* The Ant in a @. */
+/* The Ant in a address@hidden */
 #undef ANT
 
 Middle from configure.ac.
 
-The Mouse in a @.
+The Mouse in a address@hidden
 
 /* Define to the address where bug reports for this package should be sent. */
 #undef PACKAGE_BUGREPORT
@@ -512,7 +512,7 @@
 
 Bottom2 from configure.ac.
 
-The Dog in a @.
+The Dog in a address@hidden
 /* Bottom from acconfig.h. */
 ]])
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]