autoconf-commit
[Top][All Lists]
Advanced

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

[SCM] GNU Autoconf source repository branch, master, updated. v2.63-219-


From: Eric Blake
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.63-219-gabe172f
Date: Fri, 21 Nov 2008 05:12:30 +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=abe172f4ba8d375a8b078534e9cef1e084ff59ab

The branch, master has been updated
       via  abe172f4ba8d375a8b078534e9cef1e084ff59ab (commit)
      from  7811a6d5a908c215fcb838c19667c5c7daf0009f (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 abe172f4ba8d375a8b078534e9cef1e084ff59ab
Author: Eric Blake <address@hidden>
Date:   Thu Nov 20 21:59:23 2008 -0700

    Factor more common code out of AT_CHECK into shell function.
    
    * lib/autotest/general.m4 (_AT_CHECK): Avoid echo bug if AT_LINE
    starts with -.  Move preparations...
    (AT_INIT) <at_fn_check_prepare_trace>
    <at_fn_check_prepare_notrace, at_fn_check_prepare_dynamic>:
    ...into these new shell functions.
    <at_fn_check_newline>: Inline into only caller.
    (_AT_DECIDE_TRACEABLE): Use them to condense testsuite size.
    
    Signed-off-by: Eric Blake <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog               |   11 +++++++
 lib/autotest/general.m4 |   74 +++++++++++++++++++++++++++++------------------
 2 files changed, 57 insertions(+), 28 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 24b8091..8381688 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2008-11-20  Eric Blake  <address@hidden>
 
+       Factor more common code out of AT_CHECK into shell function.
+       * lib/autotest/general.m4 (_AT_CHECK): Avoid echo bug if AT_LINE
+       starts with -.  Move preparations...
+       (AT_INIT) <at_fn_check_prepare_trace>
+       <at_fn_check_prepare_notrace, at_fn_check_prepare_dynamic>:
+       ...into these new shell functions.
+       <at_fn_check_newline>: Inline into only caller.
+       (_AT_DECIDE_TRACEABLE): Use them to condense testsuite size.
+
+2008-11-20  Eric Blake  <address@hidden>
+
        Handle version numbers as decimal, even if they start with 0.
        * lib/m4sugar/m4sugar.m4 (_m4_version_unletter): Avoid
        interpreting leading zeros as octal.
diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4
index c485f69..4800701 100644
--- a/lib/autotest/general.m4
+++ b/lib/autotest/general.m4
@@ -261,16 +261,43 @@ at_fn_banner ()
   AS_ECHO(["$as_nl$at_banner_text$as_nl"])
 } # at_fn_banner
 
-AS_FUNCTION_DESCRIBE([at_fn_check_newline], [COMMAND],
-[Test if COMMAND includes a newline and, if so, print a message and return
-exit code 1.])
-at_fn_check_newline ()
+AS_FUNCTION_DESCRIBE([at_fn_check_prepare_notrace], [LINE],
+[Perform AT_CHECK preparations for the command at LINE for an
+untraceable command, or when tracing is disabled.])
+at_fn_check_prepare_notrace ()
 {
-  case "$[1]" in
- *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)'
-    return 1 ;;
- *) return 0 ;;
+  AS_ECHO(["$[1]"]) >"$at_check_line_file"
+  at_check_trace=: at_check_filter=:
+  : >"$at_stdout"; : >"$at_stderr"
+}
+
+AS_FUNCTION_DESCRIBE([at_fn_check_prepare_trace], [LINE],
+[Perform AT_CHECK preparations for the command at LINE for a traceable
+command.])
+at_fn_check_prepare_trace ()
+{
+  if test -n "$at_traceon"; then
+    AS_ECHO(["$[1]"]) >"$at_check_line_file"
+    at_check_trace=$at_traceon at_check_filter=at_fn_filter_trace
+    : >"$at_stdout"; : >"$at_stderr"
+  else
+    at_fn_check_prepare_notrace "$[1]"
+  fi
+}
+
+AS_FUNCTION_DESCRIBE([at_fn_check_prepare_dynamic], [COMMAND LINE],
+[Decide if COMMAND at LINE is traceable at runtime, and call the
+appropriate prepation function.])
+at_fn_check_prepare_dynamic ()
+{
+  case "$at_traceon:$[1]" in
+    :*$as_nl*)
+      at_fn_check_prepare_notrace "$[2]" ;;
+    *$as_nl*)
+      echo 'Not enabling shell tracing (command contains an embedded newline)'
+      at_fn_check_prepare_notrace "$[2]" ;;
+    *)
+      at_fn_check_prepare_trace "$[2]" ;;
   esac
 }
 
@@ -1841,19 +1868,17 @@ m4_cond([m4_eval(m4_index([$1], [`]) >= 0)], [1],
                [[a ${...} parameter expansion]],
        [m4_eval(m4_index([$1], m4_newline) >= 0)], [1],
                [[an embedded newline]],
-       []dnl No reason.
-))dnl
-dnl
-m4_ifval(m4_defn([at_reason]),
-[{ echo 'Not enabling shell tracing (command contains ]m4_defn([at_reason])[)'
-   false; }],
-[m4_if(m4_index([$1], [$]), [-1],
+       []))]dnl No reason.
+[m4_if(m4_index(_m4_defn([at_reason]), [a]), [0],]dnl
+dnl We know at build time that tracing COMMANDS is never safe.
+[[echo 'Not enabling shell tracing (command contains ]m4_defn([at_reason])[)'
+at_fn_check_prepare_notrace],
+       m4_index([$1], [$]), [-1],]dnl
 dnl We know at build time that tracing COMMANDS is always safe.
-[test -n "$at_traceon"],
+[[at_fn_check_prepare_trace],]dnl
 dnl COMMANDS may contain parameter expansions; expand them at runtime.
-[test -n "$at_traceon" \
-  && at_fn_check_newline "AS_ESCAPE([$1], [`\"])"])])[]dnl
-m4_popdef([at_reason])])
+[[at_fn_check_prepare_dynamic "AS_ESCAPE([$1], [`\"])"])])]dnl
+[_m4_popdef([at_reason])])
 
 
 # AT_DIFF_STDERR/AT_DIFF_STDOUT
@@ -1915,14 +1940,7 @@ m4_define([AT_DIFF_STDOUT()],
 m4_define([_AT_CHECK],
 [{ $at_traceoff
 AS_ECHO(["$at_srcdir/AT_LINE: AS_ESCAPE([[$1]])"])
-echo AT_LINE >"$at_check_line_file"
-
-if _AT_DECIDE_TRACEABLE([$1]); then
-  at_check_trace=$at_traceon at_check_filter=at_fn_filter_trace
-else
-  at_check_trace=: at_check_filter=:
-fi
-: >"$at_stdout"; : >"$at_stderr"
+_AT_DECIDE_TRACEABLE([$1]) "AS_ESCAPE(m4_dquote(AT_LINE))"
 ( $at_check_trace; [$1]
 ) >>"$at_stdout" 2>>"$at_stderr"
 at_status=$? at_failed=false


hooks/post-receive
--
GNU Autoconf source repository




reply via email to

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