From 678465f12f961a6c06f99158fc712d688c1e50cf Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Tue, 27 Jan 2009 14:48:04 +0100 Subject: [PATCH] Quote traced macros passed from autom4te to M4 * bin/autom4te (handle_m4): Apply shell_quote to macro names. * test/tools.at: Add a test case. --- bin/autom4te.in | 2 +- tests/tools.at | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletions(-) diff --git a/bin/autom4te.in b/bin/autom4te.in index 50c410c..38d6a58 100644 --- a/bin/autom4te.in +++ b/bin/autom4te.in @@ -466,7 +466,7 @@ sub handle_m4 ($@) . ' --debug=aflq' . (!exists $ENV{'AUTOM4TE_NO_FATAL'} ? ' --fatal-warning' : '') . " @address@hidden" . shell_quote ("$tcache" . $req->id . "t") - . join (' --trace=', '', sort @macro) + . join (' --trace=', '', map { shell_quote ($_) } sort @macro) . " " . files_to_options (@ARGV) . " > " . shell_quote ("$ocache" . $req->id . "t")); diff --git a/tests/tools.at b/tests/tools.at index 3fa0fdb..ec55557 100644 --- a/tests/tools.at +++ b/tests/tools.at @@ -213,6 +213,19 @@ done AT_CLEANUP +# autom4te --trace and unusual macro names +# ------------------------------------------------------ + +AT_SETUP([autom4te --trace and unusual macro names]) + +AT_DATA([file.m4], +[[ +]]) +AT_CHECK_AUTOM4TE([-t 'TR A CE' -t 'TR(A)CE' file.m4]) + +AT_CLEANUP + + ## ------------------ ## ## autoconf --trace. ## ## ------------------ ## -- 1.6.0.3