[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-217-
From: |
Eric Blake |
Subject: |
[SCM] GNU Autoconf source repository branch, master, updated. v2.63-217-g03118f3 |
Date: |
Fri, 21 Nov 2008 02:19:20 +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=03118f36d9b01cf61a7fa267707c488bf3bff1e6
The branch, master has been updated
via 03118f36d9b01cf61a7fa267707c488bf3bff1e6 (commit)
via 79042ea34671407b95a40feb4ba0963f5aad9ff7 (commit)
from 2d63737afbd39d9029ab8c4448ec31afe80784ee (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 03118f36d9b01cf61a7fa267707c488bf3bff1e6
Author: Eric Blake <address@hidden>
Date: Thu Nov 20 17:06:22 2008 -0700
Speed up AT_CHECK.
* lib/autotest/general.m4 (AT_CHECK, AT_CHECK_UNQUOTED): Expand
third and fourth arguments once.
(_AT_CHECK): Don't re-expand expected output. Rearrange code for
fewer scans of arguments.
(AT_CHECK): Update caller.
(AT_INIT) <at_fn_filter_trace>: Drop parameter.
* tests/m4sugar.at (m4@&address@hidden): Protect test with
quadrigraphs.
Signed-off-by: Eric Blake <address@hidden>
commit 79042ea34671407b95a40feb4ba0963f5aad9ff7
Author: Eric Blake <address@hidden>
Date: Thu Nov 20 17:23:52 2008 -0700
Fix XFAIL related to AT_CHECK.
* lib/autotest/general.m4 (AT_CHECK, AT_CHECK_UNQUOTED): Expand
first argument once.
(_AT_CHECK): Don't re-expand commands.
* tests/autotest.at (Multiline command from M4 expansion): Remove
XFAIL.
* tests/tools.at (autoupdating AU_ALIAS): Quote unbalanced paren.
* NEWS: Document the fallout.
Signed-off-by: Eric Blake <address@hidden>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 21 ++++++++++++++++++
NEWS | 7 ++++++
lib/autotest/general.m4 | 54 ++++++++++++++++++++--------------------------
tests/autotest.at | 5 +---
tests/m4sugar.at | 2 +-
tests/tools.at | 2 +-
6 files changed, 55 insertions(+), 36 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8b2986d..b14c98d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,26 @@
2008-11-20 Eric Blake <address@hidden>
+ Speed up AT_CHECK.
+ * lib/autotest/general.m4 (AT_CHECK, AT_CHECK_UNQUOTED): Expand
+ third and fourth arguments once.
+ (_AT_CHECK): Don't re-expand expected output. Rearrange code for
+ fewer scans of arguments.
+ (AT_CHECK): Update caller.
+ (AT_INIT) <at_fn_filter_trace>: Drop parameter.
+ * tests/m4sugar.at (m4@&address@hidden): Protect test with
+ quadrigraphs.
+
+ Fix XFAIL related to AT_CHECK.
+ * lib/autotest/general.m4 (AT_CHECK, AT_CHECK_UNQUOTED): Expand
+ first argument once.
+ (_AT_CHECK): Don't re-expand commands.
+ * tests/autotest.at (Multiline command from M4 expansion): Remove
+ XFAIL.
+ * tests/tools.at (autoupdating AU_ALIAS): Quote unbalanced paren.
+ * NEWS: Document the fallout.
+
+2008-11-20 Eric Blake <address@hidden>
+
Reduce forks in AC_DEFINE.
* lib/autoconf/general.m4 (_AC_DEFINE_Q_PRINT): New macro.
(_AC_DEFINE_Q): Use it to avoid forks for all AC_DEFINE and most
diff --git a/NEWS b/NEWS
index 297b3ea..01dbd3e 100644
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,13 @@ GNU Autoconf NEWS - User visible changes.
** The following m4sugar macros are documented now:
m4_copy m4_dumpdefs m4_rename
+** The m4sugar macro m4_expand has been taught to handle unterminated
+ comments and shell case statements. As a result, it is used in
+ more places, such as AC_DEFINE and AT_CHECK. Most uses should not
+ behave any differently; however, it may be necessary to add
+ double-quoting around unbalanced `(' where single-quoting used to
+ be sufficient.
+
** The following documented m4sh macros are new:
AS_LINENO_PREPARE AS_ME_PREPARE AS_SET_STATUS AS_VAR_APPEND
AS_VAR_ARITH AS_VAR_COPY
diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4
index ebde0b3..c485f69 100644
--- a/lib/autotest/general.m4
+++ b/lib/autotest/general.m4
@@ -274,15 +274,14 @@ at_fn_check_newline ()
esac
}
-AS_FUNCTION_DESCRIBE([at_fn_filter_trace], [EXIT-CODE],
-[Split the contents of file "$at_stder1" into the "set -x" trace (on
-stderr) and the other lines (on file "$at_stderr"). Return the exit
-code EXIT-CODE.])
+AS_FUNCTION_DESCRIBE([at_fn_filter_trace], [],
+[Remove the lines in the file "$at_stderr" generated by "set -x" and print
+them to stderr.])
at_fn_filter_trace ()
{
+ mv "$at_stderr" "$at_stder1"
grep '^ *+' "$at_stder1" >&2
grep -v '^ *+' "$at_stder1" >"$at_stderr"
- return $[1]
}
AS_FUNCTION_DESCRIBE([at_fn_log_failure], [FILE-LIST],
@@ -1743,7 +1742,8 @@ $2[]_ATEOF
# This may cause spurious failures when the test suite is run with `-x'.
#
_AT_DEFINE_SETUP([AT_CHECK],
-[_AT_CHECK([$1],[$2],[$3],[$4],[$5],[$6],1)])
+[_AT_CHECK(m4_expand([$1]), [$2], m4_expand([AS_ESCAPE([$3])]),
+ m4_expand([AS_ESCAPE([$4])]), [$5], [$6])])
# AT_CHECK_NOESCAPE(COMMANDS, [STATUS = 0], STDOUT, STDERR,
# [RUN-IF-FAIL], [RUN-IF-PASS])
@@ -1751,7 +1751,8 @@ _AT_DEFINE_SETUP([AT_CHECK],
# Like AT_CHECK, but do not AS_ESCAPE shell metacharacters in the STDOUT
# and STDERR arguments before running the comparison.
_AT_DEFINE_SETUP([AT_CHECK_NOESCAPE],
-[_AT_CHECK([$1],[$2],[$3],[$4],[$5],[$6])])
+[_AT_CHECK(m4_expand([$1]), [$2], m4_expand([$3]),
+ m4_expand([$4]), [$5], [$6])])
# _AT_DECIDE_TRACEABLE(COMMANDS)
@@ -1827,10 +1828,6 @@ _AT_DEFINE_SETUP([AT_CHECK_NOESCAPE],
# just described, the test suite preemptively disables tracing for 31 of those,
# and 268 contain parameter expansions that require runtime evaluation. The
# balance are always safe to trace.
-#
-# _AT_CHECK expands COMMANDS, but the Autoconf language does not provide a way
-# to safely expand arbitrary COMMANDS in an argument list, so the below tests
-# examine COMMANDS unexpanded.
m4_define([_AT_DECIDE_TRACEABLE],
dnl Utility macro.
dnl
@@ -1882,12 +1879,10 @@ m4_define([AT_DIFF_STDOUT()],
[at_fn_diff_devnull "$at_stdout" || at_failed=:])
# _AT_CHECK(COMMANDS, [STATUS = 0], STDOUT, STDERR,
-# [RUN-IF-FAIL], [RUN-IF-PASS], SHELL_ESCAPE_IO)
-# ---------------------------------------------------------
-# Worker for AT_CHECK & AT_CHECK_NOESCAPE. The final SHELL-ESCAPE-IO
-# argument determines whether the STDOUT & STDERR arguments will be escaped or
-# not.
-#
+# [RUN-IF-FAIL], [RUN-IF-PASS])
+# -------------------------------------------------
+# Worker for AT_CHECK and AT_CHECK_UNQUOTED, with COMMANDS, STDOUT, and
+# STDERR pre-expanded.
#
# Implementation Details
# ----------------------
@@ -1919,29 +1914,28 @@ m4_define([AT_DIFF_STDOUT()],
# with parallel jobs.
m4_define([_AT_CHECK],
[{ $at_traceoff
-AS_ECHO(["$at_srcdir/AT_LINE: AS_ESCAPE([$1])"])
+AS_ECHO(["$at_srcdir/AT_LINE: AS_ESCAPE([[$1]])"])
echo AT_LINE >"$at_check_line_file"
-: >"$at_stdout"
if _AT_DECIDE_TRACEABLE([$1]); then
- : >"$at_stder1"
- ( $at_traceon; $1 ) >>"$at_stdout" 2>>"$at_stder1"
- at_fn_filter_trace $?
+ at_check_trace=$at_traceon at_check_filter=at_fn_filter_trace
else
- : >"$at_stderr"
- ( :; $1 ) >>"$at_stdout" 2>>"$at_stderr"
+ at_check_trace=: at_check_filter=:
fi
-at_status=$?
-at_failed=false
+: >"$at_stdout"; : >"$at_stderr"
+( $at_check_trace; [$1]
+) >>"$at_stdout" 2>>"$at_stderr"
+at_status=$? at_failed=false
+$at_check_filter
m4_ifdef([AT_DIFF_STDERR($4)], [m4_indir([AT_DIFF_STDERR($4)])],
- [echo >>"$at_stderr"; AS_ECHO(["m4_ifval([$7],[AS_ESCAPE([$4])],[$4])"]) | \
+ [echo >>"$at_stderr"; AS_ECHO([["$4"]]) | \
$at_diff - "$at_stderr" || at_failed=:])
m4_ifdef([AT_DIFF_STDOUT($3)], [m4_indir([AT_DIFF_STDOUT($3)])],
- [echo >>"$at_stdout"; AS_ECHO(["m4_ifval([$7],[AS_ESCAPE([$3])],[$3])"]) | \
+ [echo >>"$at_stdout"; AS_ECHO([["$3"]]) | \
$at_diff - "$at_stdout" || at_failed=:])
m4_if([$2], [ignore], [at_fn_check_skip],
[at_fn_check_status m4_default([$2], [0])]) $at_status "$at_srcdir/AT_LINE"
-AS_IF($at_failed, [$5], [$6])
-$at_failed && at_fn_log_failure AT_capture_files
+m4_ifvaln([$5$6], [AS_IF($at_failed, [$5], [$6])])]dnl
+[$at_failed && at_fn_log_failure AT_capture_files
$at_traceon; }
])# _AT_CHECK
diff --git a/tests/autotest.at b/tests/autotest.at
index 631c0c8..820e7e3 100644
--- a/tests/autotest.at
+++ b/tests/autotest.at
@@ -310,15 +310,12 @@ AT_CHECK_AT_TEST([Invalid brace-enclosed parameter
expansion],
## M4 macros in test commands. ##
## ---------------------------- ##
-# The last paragaph in the comment above _AT_DECIDE_TRACEABLE illustrates why
-# this test fails (except with Korn shell-style quoting $'foo\nbar').
AT_CHECK_AT_TEST([Multiline command from M4 expansion],
[m4_define([GNU], ['foo
bar'])
AT_CHECK([echo GNU], 0, [foo
bar
-], [])], [case `( set -x; echo 'foo
-bar') 2>&1` in *\$\'foo\\nbar\'*) false;; *) :;; esac])
+], [])])
AT_CHECK_AT_TEST([Double-M4-quoted command],
[m4_define([GNU], ['foo
diff --git a/tests/m4sugar.at b/tests/m4sugar.at
index 708067b..e3387f6 100644
--- a/tests/m4sugar.at
+++ b/tests/m4sugar.at
@@ -507,7 +507,7 @@ m4_split([a )}@&t@>=- b -=<@&address@hidden( c])
[foo=``], [bar='']
[foo=''], [bar=``]
[a], [], [B], [], [c]
-[a], [)}>=-], [b], [-=<{(], [c]
+[a], [)}>=@&address@hidden, [b], [-@&address@hidden<{(], [c]
]])
AT_CLEANUP
diff --git a/tests/tools.at b/tests/tools.at
index 5cd64cf..3fa0fdb 100644
--- a/tests/tools.at
+++ b/tests/tools.at
@@ -786,7 +786,7 @@ AC_OUTPUT
AT_CHECK_AUTOUPDATE
AT_CHECK_AUTOCONF
AT_CHECK_CONFIGURE
-AT_CHECK([grep 'AC_HEADER_STDC(' configure.ac], 1, [ignore], [ignore])
+AT_CHECK([grep 'AC_HEADER_STDC[(]' configure.ac], 1, [ignore], [ignore])
AT_CHECK([grep 'AC_HEADER_STDC' configure.ac], 0, [ignore], [ignore])
AT_CLEANUP
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-217-g03118f3,
Eric Blake <=