78 |
# FIXME: What about `sinclude'? |
# FIXME: What about `sinclude'? |
79 |
my @preselect = ('include', |
my @preselect = ('include', |
80 |
'm4_pattern_allow', 'm4_pattern_forbid', |
'm4_pattern_allow', 'm4_pattern_forbid', |
81 |
'm4_warn'); |
'_m4_warn'); |
82 |
|
|
83 |
# M4 include path. |
# M4 include path. |
84 |
my @include; |
my @include; |
993 |
|
|
994 |
# Issue the warnings each time autom4te was run. |
# Issue the warnings each time autom4te was run. |
995 |
handle_traces ($req, "$tmp/warnings", |
handle_traces ($req, "$tmp/warnings", |
996 |
('m4_warn' => "\$1::\$f:\$l::\$2\n\n")); |
('_m4_warn' => "\$1::\$f:\$l::\$2::\$3\n\n")); |
997 |
|
# Warnings are separated by 2 \n. |
998 |
for (split (/\n{2,}/, contents ("$tmp/warnings"))) |
for (split (/\n{2,}/, contents ("$tmp/warnings"))) |
999 |
{ |
{ |
1000 |
my ($cat, $loc, $msg) = split '::'; |
# The message looks like: |
1001 |
|
# | syntax::input.as:5::ouch |
1002 |
|
# | ::input.as:4: baz is expanded from... |
1003 |
|
# | input.as:2: bar is expanded from... |
1004 |
|
# | input.as:3: foo is expanded from... |
1005 |
|
# | input.as:5: the top level |
1006 |
|
my ($cat, $loc, $msg, $stacktrace) = split ('::', $_, 4); |
1007 |
msg $cat, $loc, "warning: $msg"; |
msg $cat, $loc, "warning: $msg"; |
1008 |
|
for (split /\n/, $stacktrace) |
1009 |
|
{ |
1010 |
|
my ($loc, $trace) = split (': ', $_, 2); |
1011 |
|
msg $cat, $loc, $trace; |
1012 |
|
} |
1013 |
} |
} |
1014 |
|
|
1015 |
# Now output... |
# Now output... |