From: Eric Blake Date: Mon, 13 Jul 2009 16:35:32 +0000 (-0600) Subject: Don't hide leading space in autom4te --trace output. X-Git-Tag: v2.64~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=497a186732392d9ae297125071fc11794d364fcb;p=thirdparty%2Fautoconf.git 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. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index a2450bde..e1a64947 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-07-16 Eric Blake + + 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 Document that $srcdir can be used during configure. diff --git a/bin/autom4te.in b/bin/autom4te.in index 1baf507f..3103369c 100644 --- a/bin/autom4te.in +++ b/bin/autom4te.in @@ -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($@))]) diff --git a/tests/tools.at b/tests/tools.at index c4016cc7..542e668a 100644 --- a/tests/tools.at +++ b/tests/tools.at @@ -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. ## ## ------------------ ##