]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Don't hide leading space in autom4te --trace output.
authorEric Blake <ebb9@byu.net>
Mon, 13 Jul 2009 16:35:32 +0000 (10:35 -0600)
committerEric Blake <ebb9@byu.net>
Thu, 16 Jul 2009 12:24:21 +0000 (06:24 -0600)
* bin/autom4te.in (handle_traces): Don't flatten leading and
trailing space, since tracing spacing bugs can be useful.
* tests/tools.at (autom4te --trace and whitespace): New test.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
bin/autom4te.in
tests/tools.at

index a2450bdea8876bb3684aa81496b74bf705cb1839..e1a64947fe31d3f1ee352e249bfd2002d5568480 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-07-16  Eric Blake  <ebb9@byu.net>
+
+       Don't hide leading space in autom4te --trace output.
+       * bin/autom4te.in (handle_traces): Don't flatten leading and
+       trailing space, since tracing spacing bugs can be useful.
+       * tests/tools.at (autom4te --trace and whitespace): New test.
+
 2009-07-13  Eric Blake  <ebb9@byu.net>
 
        Document that $srcdir can be used during configure.
index 1baf507ffcd51e289a9c506414c75b888fa821d0..3103369c7b891ece22b7c942f10d40cf1f7fa098 100644 (file)
@@ -750,10 +750,7 @@ sub handle_traces ($$%)
   # Note that the second pattern is `newline, tab or space'.  Don't lose
   # the tab!
   define([at_flatten],
-  [at_patsubst(at_patsubst(at_patsubst(at_patsubst([[[[$1]]]], [\\\n]),
-                                      [[\n\t ]+], [ ]),
-                          [ *\(.\)$], [\1]),
-              [^ *\(.*\)], [[\1]])])
+  [at_patsubst(at_patsubst([[[$1]]], [\\\n]), [[\n\t ]+], [ ])])
 
   define([at_args],    [at_shift(at_shift(at_shift(at_shift(at_shift($@)))))])
   define([at_at],      [_$0([$1], at_args($@))])
index c4016cc7a2cb9d5fd494d2333754c727203a0a76..542e668a9c3867c8115157cf83186feb91dd5909 100644 (file)
@@ -226,6 +226,21 @@ AT_CHECK_AUTOM4TE([-t 'TR A CE' -t 'TR(A)CE' file.m4])
 AT_CLEANUP
 
 
+AT_SETUP([autom4te --trace and whitespace])
+
+AT_DATA([file.m4],
+[[m4@&t@_echo([  a
+b      c  ], [\
+d\
+])
+]])
+AT_CHECK_AUTOM4TE([--language=m4sugar -t 'm4@&t@_echo' file.m4], [0],
+[[file.m4:1:m4@&t@_echo: a b c :d
+]])
+
+AT_CLEANUP
+
+
 ## ------------------ ##
 ## autoconf --trace.  ##
 ## ------------------ ##