diff --git a/bin/autom4te.in b/bin/autom4te.in index 798013a..e5443e3 100644 --- a/bin/autom4te.in +++ b/bin/autom4te.in @@ -83,6 +83,10 @@ my @preselect = ('include', # M4 include path. my @include; +# M4 define/undefine. +my @define; +my @undefine; + # Do we freeze? my $freeze = 0; @@ -176,6 +180,10 @@ Library directories: -B, --prepend-include=DIR prepend directory DIR to search path -I, --include=DIR append directory DIR to search path +m4 arguments: + -D, --define=NAME[=VALUE] define NAME as having VALUE, or empty + -U, --undefine=NAME undefine NAME + Tracing: -t, --trace=MACRO[:FORMAT] report the MACRO invocations -p, --preselect=MACRO prepare to trace MACRO in a future run @@ -345,6 +353,8 @@ sub parse_args () # Library directories: "B|prepend-include=s" => address@hidden, "I|include=s" => address@hidden, + "D|define=s" => address@hidden, + "U|undefine=s" => address@hidden, # Tracing: # Using a hash for traces is seducing. Unfortunately, upon '-t FOO', @@ -465,6 +475,8 @@ sub handle_m4 ($@) xsystem ("$m4 @M4_GNU@" . join (' --include=', '', map { shell_quote ($_) } @include) . ' --debug=aflq' + . join (' --define=', '', map { shell_quote ($_) } @define) + . join (' --undefine=', '', map { shell_quote ($_) } @undefine) . (!exists $ENV{'AUTOM4TE_NO_FATAL'} ? ' --fatal-warning' : '') . " @address@hidden" . shell_quote ("$tcache" . $req->id . "t") . join (' --trace=', '', map { shell_quote ($_) } sort @macro)