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-45-g


From: Paolo Bonzini
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.63-45-g6265de1
Date: Wed, 15 Oct 2008 09:06:24 +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=6265de13feb09b7bb67a8fbe406dd71a2554f61c

The branch, master has been updated
       via  6265de13feb09b7bb67a8fbe406dd71a2554f61c (commit)
       via  270c996180a4bb09db725732ce5e1977edce9613 (commit)
      from  460ecbc03edaeaa637859e30838c5d7e96bfd36a (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 6265de13feb09b7bb67a8fbe406dd71a2554f61c
Author: Paolo Bonzini <address@hidden>
Date:   Tue Oct 14 11:16:47 2008 +0200

    Trim down the size of the better-shell test.
    
    * lib/m4sugar/m4sh.at (_AT_DETECT_BETTER_SHELL): Store the common
    snippets into shell variables.
    (_AS_RUN): Rewrite.

commit 270c996180a4bb09db725732ce5e1977edce9613
Author: Paolo Bonzini <address@hidden>
Date:   Mon Oct 13 18:23:30 2008 +0200

    Support a stack of LINENO values for AS_MESSAGE.
    
    * lib/m4sugar/m4sh.m4 (_AS_ECHO_LOG): If defined, use $as_lineno as
    the line number emitted to the log file.
    (AS_LINENO_PUSH, AS_LINENO_POP): New.
    * tests/m4sh.at (LINENO Stack): New test.

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

Summary of changes:
 ChangeLog           |   15 +++++++++++++++
 lib/m4sugar/m4sh.m4 |   43 +++++++++++++++++++++++++++----------------
 tests/m4sh.at       |   28 ++++++++++++++++++++++++++++
 3 files changed, 70 insertions(+), 16 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8a4504c..7cbb670 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2008-10-15  Paolo Bonzini  <address@hidden>
+
+       Trim down the size of the better-shell test.
+       * lib/m4sugar/m4sh.at (_AT_DETECT_BETTER_SHELL): Store the common
+       snippets into shell variables.
+       (_AS_RUN): Rewrite.
+
+2008-10-15  Paolo Bonzini  <address@hidden>
+
+       Support a stack of LINENO values for AS_MESSAGE.
+       * lib/m4sugar/m4sh.m4 (_AS_ECHO_LOG): If defined, use $as_lineno as
+       the line number emitted to the log file.
+       (AS_LINENO_PUSH, AS_LINENO_POP): New.
+       * tests/m4sh.at (LINENO Stack): New test.
+
 2008-10-14  Eric Blake  <address@hidden>
 
        Correct previous patch.
diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4
index fbc4784..20b5772 100644
--- a/lib/m4sugar/m4sh.m4
+++ b/lib/m4sugar/m4sh.m4
@@ -197,11 +197,13 @@ dnl Remove any tests from suggested that are also required
                                  [m4_set_remove([_AS_DETECT_SUGGESTED_BODY],
                                                 _m4_defn([AS_snippet]))])])dnl
   m4_set_empty([_AS_DETECT_REQUIRED_BODY], [as_have_required=yes],
-    [AS_IF([_AS_RUN(m4_set_contents([_AS_DETECT_REQUIRED_BODY])) 2>/dev/null],
+    [as_bourne_compatible="AS_ESCAPE(m4_expand([_AS_BOURNE_COMPATIBLE]))"
+    
as_required="AS_ESCAPE(m4_expand(m4_set_contents([_AS_DETECT_REQUIRED_BODY])))"
+    
as_suggested="AS_ESCAPE(m4_expand(m4_set_contents([_AS_DETECT_SUGGESTED_BODY])))"
+    AS_IF([_AS_RUN(["$as_required"])],
          [as_have_required=yes],
          [as_have_required=no])])
-  AS_IF([test $as_have_required = yes &&dnl
-        _AS_RUN(m4_set_contents([_AS_DETECT_SUGGESTED_BODY])) 2> /dev/null],
+  AS_IF([test $as_have_required = yes && _AS_RUN(["$as_suggested"])],
     [],
     [as_candidate_shells=
     _AS_PATH_WALK([/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH],
@@ -215,14 +217,11 @@ dnl Remove any tests from suggested that are also required
       for as_shell in $as_candidate_shells $SHELL; do
         # Try only shells that exist, to save several forks.
         AS_IF([{ test -f "$as_shell" || test -f "$as_shell.exe"; } &&
-               _AS_RUN(m4_set_contents([_AS_DETECT_REQUIRED_BODY]),
-                       [("$as_shell") 2> /dev/null])],
+               _AS_RUN(["$as_required"], ["$as_shell"])],
               [CONFIG_SHELL=$as_shell
               as_have_required=yes
               m4_set_empty([_AS_DETECT_SUGGESTED_BODY], [break],
-                [AS_IF([_AS_RUN(m4_set_contents([_AS_DETECT_SUGGESTED_BODY]),
-                                ["$as_shell" 2> /dev/null])],
-                       [break])])])
+                [AS_IF([_AS_RUN(["$as_suggested"], ["$as_shell"])], 
[break])])])
       done
 
       AS_IF([test "x$CONFIG_SHELL" != x],
@@ -329,13 +328,8 @@ $2
 # Run TEST under the current shell (if one parameter is used)
 # or under the given SHELL, protecting it from syntax errors.
 m4_define([_AS_RUN],
-[m4_ifval([$2],
-[{ $2 <<\_ASEOF
-_AS_BOURNE_COMPATIBLE
-$1
-_ASEOF
-}],
-[(eval "AS_ESCAPE(m4_expand([$1]))")])])
+[m4_ifval([$2], [{ $as_echo "$as_bourne_compatible"$1 | ($2); }],
+               [(eval $1)]) 2>/dev/null])
 
 
 # _AS_SHELL_FN_WORK
@@ -624,7 +618,7 @@ m4_define([_AS_ECHO],
 # Log the string to AS_MESSAGE_LOG_FD.
 m4_define([_AS_ECHO_LOG],
 [AS_REQUIRE([_AS_LINENO_PREPARE])dnl
-_AS_ECHO([$as_me:$LINENO: $1], [AS_MESSAGE_LOG_FD])])
+_AS_ECHO([$as_me:${as_lineno-$LINENO}: $1], [AS_MESSAGE_LOG_FD])])
 
 
 # _AS_ECHO_N_PREPARE
@@ -683,6 +677,23 @@ m4_define([AS_ERROR],
 
 
 
+# AS_LINENO_PUSH([LINENO])
+# ------------------------
+# If this is the outermost call to AS_LINENO_PUSH, make sure that
+# AS_MESSAGE will print LINENO as the line number.
+m4_defun([AS_LINENO_PUSH], 
+[as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack])
+
+
+# AS_LINENO_POP([LINENO])
+# ------------------------
+# If this is call balances the outermost call to AS_LINENO_PUSH,
+# AS_MESSAGE will restart printing $LINENO as the line number.
+m4_defun([AS_LINENO_POP],
+[eval $as_lineno_stack; test "x$as_lineno_stack" = x && AS_UNSET([as_lineno])])
+
+
+
 ## -------------------------------------- ##
 ## 4. Portable versions of common tools.  ##
 ## -------------------------------------- ##
diff --git a/tests/m4sh.at b/tests/m4sh.at
index 1f8f836..4951fd9 100644
--- a/tests/m4sh.at
+++ b/tests/m4sh.at
@@ -96,6 +96,34 @@ AT_CLEANUP
 
 
 
+## ---------------------- ##
+## LINENO stack support.  ##
+## ---------------------- ##
+
+AT_SETUP([LINENO stack])
+AT_KEYWORDS([m4sh])
+
+AT_DATA_M4SH([script.as],
+[[AS_INIT
+
+AS_LINENO_PUSH([9999])
+test $as_lineno = 9999 || AS_ERROR([bad as_lineno at depth 1])
+AS_LINENO_PUSH([8888])
+test $as_lineno = 9999 || AS_ERROR([bad as_lineno at depth 2])
+AS_LINENO_POP
+test $as_lineno = 9999 || AS_ERROR([bad as_lineno at depth 1])
+AS_LINENO_POP
+test x${as_lineno+set} = xset && AS_ERROR([as_lineno set at depth 0])
+
+AS_EXIT([0])
+]])
+
+AT_CHECK_M4SH
+AT_CHECK([./script])
+
+AT_CLEANUP
+
+
 ## ------------ ##
 ## AS_DIRNAME.  ##
 ## ------------ ##


hooks/post-receive
--
GNU Autoconf source repository




reply via email to

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