[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU Autoconf source repository branch, master, updated. v2.63-192-
From: |
Eric Blake |
Subject: |
[SCM] GNU Autoconf source repository branch, master, updated. v2.63-192-g1a0a363 |
Date: |
Thu, 13 Nov 2008 20:50:36 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".
http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=1a0a363042aeb07664d893568074ff5897905a35
The branch, master has been updated
via 1a0a363042aeb07664d893568074ff5897905a35 (commit)
from d623082df620e71f807c5db17c8330c8e3b2a8f7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1a0a363042aeb07664d893568074ff5897905a35
Author: Eric Blake <address@hidden>
Date: Thu Nov 13 12:17:01 2008 -0700
Fix AS_ESCAPE usage bugs.
* lib/m4sugar/m4sh.m4 (_AS_VAR_APPEND_PREPARE)
(_AS_VAR_ARITH_PREPARE): Expand macros prior to adding shell
escapes.
(AS_TR_SH, AS_VAR_GET): Use _AS_ESCAPE for speed.
* doc/autoconf.texi (Polymorphic Variables) <AS_VAR_SET>: Document
caveat due to conditional AS_ESCAPE.
* tests/m4sh.at (AS@&address@hidden basics): Enhance test.
Signed-off-by: Eric Blake <address@hidden>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 11 +++++++++++
doc/autoconf.texi | 4 +++-
lib/m4sugar/m4sh.m4 | 10 ++++------
tests/m4sh.at | 13 +++++++------
4 files changed, 25 insertions(+), 13 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 88ea131..3e9a701 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2008-11-13 Eric Blake <address@hidden>
+
+ Fix AS_ESCAPE usage bugs.
+ * lib/m4sugar/m4sh.m4 (_AS_VAR_APPEND_PREPARE)
+ (_AS_VAR_ARITH_PREPARE): Expand macros prior to adding shell
+ escapes.
+ (AS_TR_SH, AS_VAR_GET): Use _AS_ESCAPE for speed.
+ * doc/autoconf.texi (Polymorphic Variables) <AS_VAR_SET>: Document
+ caveat due to conditional AS_ESCAPE.
+ * tests/m4sh.at (AS@&address@hidden basics): Enhance test.
+
2008-11-12 Eric Blake <address@hidden>
Whitespace reduction in configure.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 4081604..07db254 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -12283,7 +12283,9 @@ Emit shell code to assign the contents of the
polymorphic shell variable
@var{var} to the shell expansion of @var{value}. @var{value} is not
subject to field splitting or file name expansion, so if command
substitution is used, it may be done with @samp{`""`} rather than using
-an intermediate variable (@pxref{Shell Substitutions}).
+an intermediate variable (@pxref{Shell Substitutions}). However,
address@hidden does undergo rescanning for additional macro names; behavior
+is unspecified if late expansion results in any shell meta-characters.
@end defmac
@defmac AS_VAR_SET_IF (@var{var}, @ovar{if-set}, @ovar{if-undef})
diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4
index 2790d8a..a39f702 100644
--- a/lib/m4sugar/m4sh.m4
+++ b/lib/m4sugar/m4sh.m4
@@ -1602,8 +1602,7 @@ m4_defun_init([AS_TR_SH],
m4_dquote(m4_dquote(m4_defn([m4_cr_not_symbols2])))[[,
[pp[]]]]dnl
m4_dquote(m4_dquote(m4_for(,1,255,,[[_]])))[[)],
- [`AS_ECHO(["m4_bpatsubst(m4_dquote(m4_expand([$1])),
- [[\\`]], [\\\&])"]) | $as_tr_sh`])])
+ [`AS_ECHO(["_AS_ESCAPE(m4_dquote(m4_expand([$1])), [\`])"]) | $as_tr_sh`])])
# _AS_TR_CPP_PREPARE
@@ -1668,7 +1667,7 @@ m4_defun([_AS_VAR_APPEND_PREPARE],
VAR. Take advantage of any shell optimizations that allow amortized
linear growth over repeated appends, instead of the typical quadratic
growth present in naive implementations.])
-AS_IF([_AS_RUN(["AS_ESCAPE([_AS_VAR_APPEND_WORKS])"])],
+AS_IF([_AS_RUN(["AS_ESCAPE(m4_quote(_AS_VAR_APPEND_WORKS))"])],
[eval 'as_func_append ()
{
eval $[]1+=\$[]2
@@ -1709,7 +1708,7 @@ m4_defun([_AS_VAR_ARITH_PREPARE],
[Perform arithmetic evaluation on the ARGs, and store the result in
the global $as_val. Take advantage of shells that can avoid forks.
The arguments must be portable across $(()) and expr.])
-AS_IF([_AS_RUN(["AS_ESCAPE([_AS_VAR_ARITH_WORKS])"])],
+AS_IF([_AS_RUN(["AS_ESCAPE(m4_quote(_AS_VAR_ARITH_WORKS))"])],
[eval 'as_func_arith ()
{
as_val=$(( $[]* ))
@@ -1761,8 +1760,7 @@ m4_define([AS_VAR_COPY],
m4_define([AS_VAR_GET],
[AS_LITERAL_IF([$1],
[$$1],
- [`eval 'as_val=${'m4_bpatsubst([$1], [[\\`]], [\\\&])'};dnl
-AS_ECHO(["$as_val"])'`])])
+ [`eval 'as_val=${'_AS_ESCAPE([[$1]], [\`])'};AS_ECHO(["$as_val"])'`])])
# AS_VAR_IF(VARIABLE, VALUE, IF-TRUE, IF-FALSE)
diff --git a/tests/m4sh.at b/tests/m4sh.at
index 214b555..a8acf56 100644
--- a/tests/m4sh.at
+++ b/tests/m4sh.at
@@ -952,6 +952,7 @@ AT_KEYWORDS([AS@&address@hidden AS@&address@hidden)
AT_DATA_M4SH([script.as], [[dnl
AS_INIT
+ m4_define([with], [WITH])
# Literals.
dnl AS_VAR_SET_IF also covers AS_VAR_TEST_SET
AS_VAR_SET_IF([foo], [echo oops]) && echo ok
@@ -1009,26 +1010,26 @@ m4_ifdef([tmp], [echo oops])
AT_CHECK_M4SH
AT_CHECK([./script], [], [[ok
-\a "weird" `value` with; $fun 'characters
+\a "weird" `value` WITH; $fun 'characters
-
-\a "weird" `value` with; $fun 'characters
+\a "weird" `value` WITH; $fun 'characters
-
ok
ok
ok
====
ok
-\a "weird" `value` with; $fun 'characters
+\a "weird" `value` WITH; $fun 'characters
-
-\a "weird" `value` with; $fun 'characters-
+\a "weird" `value` WITH; $fun 'characters-
ok
ok
ok
====
ok
-\a "weird" `value` with; $fun 'characters
+\a "weird" `value` WITH; $fun 'characters
-
-\a "weird" `value` with; $fun 'characters-
+\a "weird" `value` WITH; $fun 'characters-
ok
ok
ok
hooks/post-receive
--
GNU Autoconf source repository
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU Autoconf source repository branch, master, updated. v2.63-192-g1a0a363,
Eric Blake <=