]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* tests/tools.at (Tracing M4 builtins): New test.
authorAkim Demaille <akim@epita.fr>
Thu, 2 Nov 2000 15:32:23 +0000 (15:32 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 2 Nov 2000 15:32:23 +0000 (15:32 +0000)
* autoconh.sh (trace_format): Fix its computation.

ChangeLog
autoconf.in
autoconf.sh
bin/autoconf.in
tests/tools.at

index 91d5f3cfffa41cf903b577c019b72cd0a14af07b..176c8ff13960a499a9f6158c347c6075a66033bd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-11-02  Akim Demaille  <akim@epita.fr>
+
+       * tests/tools.at (Tracing M4 builtins): New test.
+       * autoconh.sh (trace_format): Fix its computation.
+
 2000-11-02  Akim Demaille  <akim@epita.fr>
 
        * tests/atgeneral.m4 (AT_CHECK): Check stderr first, since if both
@@ -9,7 +14,7 @@
        * autoconf.sh (task trace) [debug]: Instead of a long pipe, extend
        trace.m4.
 
-       
+
 2000-11-02  Akim Demaille  <akim@epita.fr>
 
        * autoupdate.sh (m4.txt): Use `dumpdef' and m4 to build it.
index 7017bd7c3939d1528c9b35ea297ecd334ed4ba80..dec6e06126270bcb8d9a650a28686d70cccdb132 100644 (file)
@@ -570,7 +570,14 @@ EOF
   do
     # The request may be several lines long, hence sed has to quit.
     macro_name=`echo "$trace" | sed 's/:.*//;q'`
-    trace_format=`echo "$trace" | sed '1s/^[^:]*:/:/'`
+    # If for instance TRACE is `define', be sure to have an empty
+    # TRACE_FORMAT.
+    case $trace in
+      $macro_name:* )
+         trace_format=`echo "$trace" | sed "1s/^$macro_name:/:/"`;;
+      * )
+         trace_format=;;
+    esac
 
     # GNU M4 1.4's tracing of builtins is buggy.  When run on this input:
     #
index 7017bd7c3939d1528c9b35ea297ecd334ed4ba80..dec6e06126270bcb8d9a650a28686d70cccdb132 100644 (file)
@@ -570,7 +570,14 @@ EOF
   do
     # The request may be several lines long, hence sed has to quit.
     macro_name=`echo "$trace" | sed 's/:.*//;q'`
-    trace_format=`echo "$trace" | sed '1s/^[^:]*:/:/'`
+    # If for instance TRACE is `define', be sure to have an empty
+    # TRACE_FORMAT.
+    case $trace in
+      $macro_name:* )
+         trace_format=`echo "$trace" | sed "1s/^$macro_name:/:/"`;;
+      * )
+         trace_format=;;
+    esac
 
     # GNU M4 1.4's tracing of builtins is buggy.  When run on this input:
     #
index 7017bd7c3939d1528c9b35ea297ecd334ed4ba80..dec6e06126270bcb8d9a650a28686d70cccdb132 100644 (file)
@@ -570,7 +570,14 @@ EOF
   do
     # The request may be several lines long, hence sed has to quit.
     macro_name=`echo "$trace" | sed 's/:.*//;q'`
-    trace_format=`echo "$trace" | sed '1s/^[^:]*:/:/'`
+    # If for instance TRACE is `define', be sure to have an empty
+    # TRACE_FORMAT.
+    case $trace in
+      $macro_name:* )
+         trace_format=`echo "$trace" | sed "1s/^$macro_name:/:/"`;;
+      * )
+         trace_format=;;
+    esac
 
     # GNU M4 1.4's tracing of builtins is buggy.  When run on this input:
     #
index c83bc785de03d21e7f9d550a1deacc40edd4bcb6..9ddf2346b0f58f881a83542d5d5efd2d91a323b2 100644 (file)
@@ -244,12 +244,15 @@ AT_CLEANUP
 ## autoconf --trace.  ##
 ## ------------------ ##
 
+
+# Tracing user defined macros
+# ---------------------------
 AT_SETUP(autoconf --trace)
 
 AT_DATA(configure.in,
-[[define(active, ACTIVE)
-AC_DEFUN(TRACE1, [TRACE2(m4_shift($@))])
-AC_DEFUN(TRACE2, [[$2], $1])
+[[define([active], [ACTIVE])
+AC_DEFUN([TRACE1], [TRACE2(m4_shift($@))])
+AC_DEFUN([TRACE2], [[$2], $1])
 TRACE1(foo, bar, baz)
 TRACE1(foo, AC_TRACE1(bar, baz))
 TRACE1(foo, active, baz)
@@ -297,6 +300,31 @@ AT_CHECK([autoconf --autoconf-dir .. -l $at_srcdir -t TRACE2:'${)===(}@'], 0,
 AT_CLEANUP
 
 
+# Tracing builtins
+# ----------------
+AT_SETUP(Tracing M4 builtins)
+
+AT_DATA(configure.in,
+[[define([active], [ACTIVE])
+]])
+
+AT_CHECK([[autoconf --autoconf-dir .. -l $at_srcdir -t define |
+            sed -n '$p']],
+         0,
+[[configure.in:1:define:active:ACTIVE
+]])
+
+# FIXME: Without `$1' the following test dies.  Groumphf, once again to
+# dive into obscure feature interaction...
+AT_CHECK([[autoconf --autoconf-dir .. -l $at_srcdir -t define:'$1' -i |
+            sed -n '$p']],
+         0,
+[[active
+]])
+
+AT_CLEANUP
+
+
 
 
 ## ----------------------------------------------- ##