[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fix AT_SETUP's sh-escaping
From: |
Paul Eggert |
Subject: |
Re: fix AT_SETUP's sh-escaping |
Date: |
Mon, 23 Oct 2006 10:06:07 -0700 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
"Joel E. Denny" <address@hidden> writes:
> It's complete for both Autoconf and Automake.
Ah, OK, thanks.
A few thoughts on the patch enclosed in
<http://lists.gnu.org/archive/html/autoconf-patches/2006-08/msg00015.html>.
First, shouldn't that m4_dquote be m4_quote? Second, it'd be a bit
nicer if the initialization of at_help_all had one double-quote at the
start and one at the end, rather than lots of double-double-quotes
sprinkled throughout. Third and most important, I tried the patch in
CVS Autoconf, and it failed as follows. Can you please look into
this?
/bin/sh ./testsuite
## ------------------------------ ##
## GNU Autoconf 2.60c test suite. ##
## ------------------------------ ##
./testsuite: line 24501: syntax error near unexpected token `echo'
./testsuite: line 24501: ` 77 echo 77 > "$at_status_file"; exit 77;;'
make[2]: *** [check-local] Error 2
make[2]: Leaving directory `/home/eggert/src/gnu/autoconf/tests'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `/home/eggert/src/gnu/autoconf/tests'
make: *** [check-recursive] Error 1
Here's the patch I tried. I extracted it from the abovementioned URL
but some hand-patching was necessary afterwards so I enclose it in
case I messed up.
--- lib/autotest/general.m4 15 Oct 2006 01:12:02 -0000 1.215
+++ lib/autotest/general.m4 23 Oct 2006 16:58:13 -0000
@@ -279,7 +279,7 @@ at_groups_all='AT_groups_all'
# numerical order.
at_format='m4_bpatsubst(m4_defn([AT_ordinal]), [.], [?])'
# Description of all the test groups.
-at_help_all='AT_help_all'])])dnl
+at_help_all=AT_help_all])])dnl
m4_divert_push([PARSE_ARGS])dnl
at_prev=
@@ -1170,15 +1170,15 @@ m4_define([AT_SETUP],
m4_ifdef([AT_capture_files], [m4_undefine([AT_capture_files])])
m4_define([AT_line], AT_LINE)
m4_define([AT_xfail], [at_xfail=no])
-m4_define([AT_description], [$1])
+m4_define([AT_description], [[$1]])
m4_define([AT_ordinal], m4_incr(AT_ordinal))
m4_append([AT_groups_all], [ ]m4_defn([AT_ordinal]))
m4_divert_push([TESTS])dnl
AT_ordinal ) @%:@ AT_ordinal. m4_defn([AT_line]): $1
at_setup_line='m4_defn([AT_line])'
- at_desc='$1'
+ at_desc="AS_ESCAPE([$1])"
$at_quiet $ECHO_N "m4_format([%3d: %-]m4_eval(47 - m4_qdelta([$1]))[s],
- AT_ordinal, [[$1]])[]$ECHO_C"
+ AT_ordinal, m4_dquote(AS_ESCAPE([$1])))[]$ECHO_C"
m4_divert_push([TEST_SCRIPT])dnl
])
@@ -1220,8 +1220,8 @@ m4_define([AT_CAPTURE_FILE],
# Complete a group of related tests.
m4_define([AT_CLEANUP],
[m4_append([AT_help_all],
-m4_defn([AT_ordinal]);m4_defn([AT_line]);m4_defn([AT_description]);m4_ifdef([AT_keywords],
[m4_defn([AT_keywords])]);
-)dnl
+"AS_ESCAPE(m4_defn([AT_ordinal]);m4_defn([AT_line]);m4_defn([AT_description]);m4_ifdef([AT_keywords],
[m4_defn([AT_keywords])]);)
+")dnl
m4_divert_pop([TEST_SCRIPT])dnl Back to TESTS
AT_xfail
echo "# -*- compilation -*-" >> "$at_group_log"
- Re: fix AT_SETUP's sh-escaping, Joel E. Denny, 2006/10/22
- Message not available
- Message not available
- Re: fix AT_SETUP's sh-escaping,
Paul Eggert <=
- Re: fix AT_SETUP's sh-escaping, Joel E. Denny, 2006/10/25
- m4_quote [was: fix AT_SETUP's sh-escaping], Eric Blake, 2006/10/25
- Re: m4_quote [was: fix AT_SETUP's sh-escaping], Joel E. Denny, 2006/10/26
- Re: m4_quote [was: fix AT_SETUP's sh-escaping], Eric Blake, 2006/10/26
- Re: m4_quote, Paul Eggert, 2006/10/26
- Re: m4_quote, Joel E. Denny, 2006/10/26
- Re: m4_quote, Eric Blake, 2006/10/26
- Re: fix AT_SETUP's sh-escaping, Stepan Kasal, 2006/10/25
- Re: fix AT_SETUP's sh-escaping, Paul Eggert, 2006/10/25
- Re: fix AT_SETUP's sh-escaping, Joel E. Denny, 2006/10/26