[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU Autoconf source repository branch, master, updated. v2.65-118-
From: |
Eric Blake |
Subject: |
[SCM] GNU Autoconf source repository branch, master, updated. v2.65-118-gab90874 |
Date: |
Fri, 02 Jul 2010 21:52:11 +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=ab90874a9a64ade3b99e3baeee9802330ff212d4
The branch, master has been updated
via ab90874a9a64ade3b99e3baeee9802330ff212d4 (commit)
from a037f56c4090421040ba75ea51e9e61812b6ad45 (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 ab90874a9a64ade3b99e3baeee9802330ff212d4
Author: Eric Blake <address@hidden>
Date: Fri Jul 2 15:35:45 2010 -0600
Make AS_TR_SH and AS_TR_CPP similar.
* lib/m4sugar/m4sh.m4 (_AS_TR_CPP_LITERAL): Avoid underquoting.
(_AS_TR_CPP_INDIR): Handle all polymorphic variables.
* tests/m4sh.at (AS@&address@hidden and AS@&address@hidden): New test.
* NEWS: Document the fix.
Reported by Bruno Haible.
Signed-off-by: Eric Blake <address@hidden>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 7 ++++
NEWS | 2 +
lib/m4sugar/m4sh.m4 | 4 +-
tests/m4sh.at | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 88 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 4c31e0e..00c9096 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2010-07-02 Eric Blake <address@hidden>
+ Make AS_TR_SH and AS_TR_CPP similar.
+ * lib/m4sugar/m4sh.m4 (_AS_TR_CPP_LITERAL): Avoid underquoting.
+ (_AS_TR_CPP_INDIR): Handle all polymorphic variables.
+ * tests/m4sh.at (AS@&address@hidden and AS@&address@hidden): New test.
+ * NEWS: Document the fix.
+ Reported by Bruno Haible.
+
Reduce startup cost of autotest.
* lib/autotest/general.m4 (_AT_FINISH) <banners>: Rather than
doing a recursive find, limit ourselves to top ChangeLog only.
diff --git a/NEWS b/NEWS
index cb1ffbd..53f34c0 100644
--- a/NEWS
+++ b/NEWS
@@ -43,6 +43,8 @@ GNU Autoconf NEWS - User visible changes.
Furthermore, a new macro, AS_LITERAL_WORD_IF, adds an additional
level of checking that no whitespace occurs in literals.
+** The macros AS_TR_SH and AS_TR_CPP no longer expand their results.
+
** The following macros are now documented:
AS_BOX
diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4
index 2a4faf3..e1d03d9 100644
--- a/lib/m4sugar/m4sh.m4
+++ b/lib/m4sugar/m4sh.m4
@@ -1816,12 +1816,12 @@ m4_define([_AS_TR_CPP],
])([], [$0_INDIR], [$0_LITERAL])([$1])])
m4_define([_AS_TR_CPP_LITERAL],
-[m4_translit([$1],
+[m4_translit([[$1]],
[*[]]]m4_dquote(m4_defn([m4_cr_letters])m4_defn([m4_cr_not_symbols2]))[,
[P[]]]m4_dquote(m4_defn([m4_cr_LETTERS])m4_for(,1,255,,[[_]]))[)])
m4_define([_AS_TR_CPP_INDIR],
-[`AS_ECHO(["$1"]) | $as_tr_cpp`])
+[`AS_ECHO(["_AS_ESCAPE([[$1]], [`], [\])"]) | $as_tr_cpp`])
# _AS_TR_PREPARE
diff --git a/tests/m4sh.at b/tests/m4sh.at
index f5ea7e2..96a2acb 100644
--- a/tests/m4sh.at
+++ b/tests/m4sh.at
@@ -1169,6 +1169,83 @@ ok 16
AT_CLEANUP
+## --------------------- ##
+## AS_TR_SH, AS_TR_CPP. ##
+## --------------------- ##
+
+AT_SETUP([AS@&address@hidden and AS@&address@hidden)
+
+AT_DATA_M4SH([script.as], [[dnl
+AS_INIT
+m4_define([abc], [hI])m4_define([ABC], [Hi])
+m4_define([hi], [oops])m4_define([HI], [OOPS])
+echo AS_TR_SH(abc) AS_TR_SH(aBc) AS_TR_SH(ABC)
+echo AS_TR_SH([abc]) AS_TR_SH([aBc]) AS_TR_SH([ABC])
+echo AS_TR_SH([[abc]]) AS_TR_SH([[aBc]]) AS_TR_SH([[ABC]])
+echo AS_TR_CPP(abc) AS_TR_CPP(aBc) AS_TR_CPP(ABC)
+echo AS_TR_CPP([abc]) AS_TR_CPP([aBc]) AS_TR_CPP([ABC])
+echo AS_TR_CPP([[abc]]) AS_TR_CPP([[aBc]]) AS_TR_CPP([[ABC]])
+echo ===
+[var=abc vAr=aBc VAR=ABC]
+echo AS_TR_SH($var) AS_TR_SH($vAr) AS_TR_SH($VAR)
+echo AS_TR_SH([$var]) AS_TR_SH([$vAr]) AS_TR_SH([$VAR])
+echo AS_TR_SH([[$var]]) AS_TR_SH([[$vAr]]) AS_TR_SH([[$VAR]])
+echo AS_TR_CPP($var) AS_TR_CPP($vAr) AS_TR_CPP($VAR)
+echo AS_TR_CPP([$var]) AS_TR_CPP([$vAr]) AS_TR_CPP([$VAR])
+echo AS_TR_CPP([[$var]]) AS_TR_CPP([[$vAr]]) AS_TR_CPP([[$VAR]])
+echo ===
+var=abc vAr=aBc VAR=ABC
+echo AS_TR_SH(`echo abc`) AS_TR_SH(`echo aBc`) AS_TR_SH(`echo ABC`)
+echo AS_TR_SH([`echo abc`]) AS_TR_SH([`echo aBc`]) AS_TR_SH([`echo ABC`])
+echo AS_TR_SH([[`echo abc`]]) AS_TR_SH([[`echo aBc`]]) AS_TR_SH([[`echo ABC`]])
+echo AS_TR_CPP(`echo abc`) AS_TR_CPP(`echo aBc`) AS_TR_CPP(`echo ABC`)
+echo AS_TR_CPP([`echo abc`]) AS_TR_CPP([`echo aBc`]) AS_TR_CPP([`echo ABC`])
+echo AS_TR_CPP([[`echo abc`]]) AS_TR_CPP([[`echo aBc`]]) AS_TR_CPP([[`echo
ABC`]])
+echo ===
+echo AS_TR_SH([a.b/c+*-])
+echo AS_TR_CPP([a.b/c+*-])
+var=a.b/c+*-
+echo AS_TR_SH([$var])
+echo AS_TR_CPP([$var])
+m4_define([macro], [a.b/c+*-])
+echo AS_TR_SH([macro])
+echo AS_TR_CPP([macro])
+]])
+
+AT_CHECK_M4SH
+AT_CHECK([$CONFIG_SHELL ./script], [],
+[[hI aBc Hi
+hI aBc Hi
+abc aBc ABC
+HI ABC HI
+HI ABC HI
+ABC ABC ABC
+===
+abc aBc ABC
+abc aBc ABC
+abc aBc ABC
+ABC ABC ABC
+ABC ABC ABC
+ABC ABC ABC
+===
+hI aBc Hi
+hI aBc Hi
+abc aBc ABC
+HI ABC HI
+HI ABC HI
+ABC ABC ABC
+===
+a_b_cpp_
+A_B_C_P_
+a_b_cpp_
+A_B_C_P_
+a_b_cpp_
+A_B_C_P_
+]])
+
+AT_CLEANUP
+
+
## ---------- ##
## AS_VAR_*. ##
## ---------- ##
hooks/post-receive
--
GNU Autoconf source repository
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU Autoconf source repository branch, master, updated. v2.65-118-gab90874,
Eric Blake <=