autoconf-patches
[Top][All Lists]
Advanced

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

Bug fix for rewriting of traces without arguments.


From: Alexandre Duret-Lutz
Subject: Bug fix for rewriting of traces without arguments.
Date: 02 Aug 2001 12:22:15 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Pfew, it took me some time to understand why the various autoscripts
started to output with very helpful messages like this:
% autoconf
NONE:0: /usr/bin/m4: ERROR: EOF in argument list
NONE:0: /usr/bin/m4: ERROR: EOF in argument list
NONE:0: /usr/bin/m4: ERROR: EOF in argument list

It turns out that when Autom4te outputs traces.m4 from traces.0,
it transforms lines like

 m4trace:configure.ac:118: -1- AC_C_CONST

as

 AT_AC_C_CONST([configure.ac], [118], [1], [AC_C_CONST]

Missing the trailing parenthesis.

Index: ChangeLog
from  Alexandre Duret-Lutz  <address@hidden>

        * bin/autom4te.in (handle_traces): Fix rewriting of traces without
        arguments.

Index: bin/autom4te.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/bin/autom4te.in,v
retrieving revision 1.14
diff -u -r1.14 autom4te.in
--- bin/autom4te.in 2001/08/01 15:10:36 1.14
+++ bin/autom4te.in 2001/08/02 10:12:30
@@ -833,12 +833,14 @@
     or die "$me: cannot open $me.cache/" . $req->cache . ": $!\n";
   while ($_ = $traces->getline)
     {
-      # Multiline traces.
+      # Trace with arguments, as the example above.  We don't try
+      # to match the trailing parenthesis as it might be on a
+      # separate line.
       s{^m4trace:(.+):(\d+): -(\d+)- ([^(]+)\((.*)$}
        {AT_$4([$1], [$2], [$3], [$4], $5};
-      # Single line traces, as the example above.
-      s{^m4trace:(.+):(\d+): -(\d+)- (.*)$}
-       {AT_$4([$1], [$2], [$3], [$4]};
+      # Traces without arguments, always on a single line.
+      s{^m4trace:(.+):(\d+): -(\d+)- (.*)\)$}
+       {AT_$4([$1], [$2], [$3], [$4])};
       print $trace_m4 "$_";
     }
   $trace_m4->close;

-- 
Alexandre Duret-Lutz





reply via email to

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