autoconf-patches
[Top][All Lists]
Advanced

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

Re: config files substitution with awk


From: Ralf Wildenhues
Subject: Re: config files substitution with awk
Date: Mon, 27 Nov 2006 20:00:34 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Hello Paul,

* Paul Eggert wrote on Sun, Nov 26, 2006 at 06:54:36PM CET:
> I installed this:
[...]
>       Rewrite config files generation: avoid quadratic growth in
>       the number of substituted variables by using awk instead of sed
>       for the bulk of the substitutions.

Thank you.  For now I only installed this obvious bugfix, exposed by
automake/tests/instspc.test.

Cheers,
Ralf

        * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Fix error
        in the sed script that mangles the awk script: delete up to the
        first exclamation mark only.
        * tests/torture.at (Substitute and define special characters):
        Test '!' too.

Index: lib/autoconf/status.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/status.m4,v
retrieving revision 1.120
diff -u -r1.120 status.m4
--- lib/autoconf/status.m4      26 Nov 2006 17:53:11 -0000      1.120
+++ lib/autoconf/status.m4      27 Nov 2006 19:02:10 -0000
@@ -446,7 +446,7 @@
 h
 s/^/S["/; s/!.*/"]=/; p
 g
-s/^.*!//
+s/^[^!]*!//
 :more
 t more
 h
Index: tests/torture.at
===================================================================
RCS file: /cvsroot/autoconf/autoconf/tests/torture.at,v
retrieving revision 1.73
diff -u -r1.73 torture.at
--- tests/torture.at    26 Nov 2006 17:53:11 -0000      1.73
+++ tests/torture.at    27 Nov 2006 19:02:10 -0000
@@ -620,7 +620,7 @@
 ])
 
 AT_CONFIGURE_AC(
-[[foo="AS@&address@hidden([[X*'[]+ ",& &`\($foo \& \\& \\\& \\\\& \ \\ \\\]])"
+[[foo="AS@&address@hidden([[X*'[]+ ",& &`\($foo \& \\& \\\& \\\\& \ \\ \\\ 
!]])"
 bar="@foo@ @baz@"
 baz=bla
 AC_SUBST([foo])
@@ -628,13 +628,13 @@
 AC_SUBST([baz])
 file=File
 AC_SUBST_FILE([file])
-AC_DEFINE([foo], [[X*'[]+ ",& &`\($foo]], [Awful value.])
+AC_DEFINE([foo], [[X*'[]+ ",& &`\($foo !]], [Awful value.])
 AC_CONFIG_FILES([Foo])]])
 
 AT_CHECK_AUTOCONF
 AT_CHECK_AUTOHEADER
 AT_CHECK_CONFIGURE
-AT_CHECK([cat Foo], 0, [[X*'[]+ ",& &`\($foo \& \\& \\\& \\\\& \ \\ \\\
+AT_CHECK([cat Foo], 0, [[X*'[]+ ",& &`\($foo \& \\& \\\& \\\\& \ \\ \\\ !
 @foo@ @baz@@address@hidden stray @ and more@@bla
 address@hidden@ @address@hidden@baz
 address@hidden@ @address@hidden
@@ -647,7 +647,7 @@
 address@hidden@
 @address@hidden
 ]])
-AT_CHECK_DEFINES([[#define foo X*'[]+ ",& &`\($foo
+AT_CHECK_DEFINES([[#define foo X*'[]+ ",& &`\($foo !
 ]])
 AT_CLEANUP
 




reply via email to

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