summaryrefslogtreecommitdiff
path: root/lib/Automake/ChannelDefs.pm
diff options
context:
space:
mode:
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>2010-04-11 21:04:13 +0200
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>2010-04-11 21:04:13 +0200
commitbda8d57b6af0bf3dfe2524514304856a16766b7d (patch)
tree2e829100bd955a45b43cd51190c4488a0d0a58d3 /lib/Automake/ChannelDefs.pm
parent483b962ed7e87600ee0f1581a15f747ea8195452 (diff)
downloadautomake-bda8d57b6af0bf3dfe2524514304856a16766b7d.tar.gz
Prepend type to warning, error, and fatal messages.
For the first part of messages of types `error' or `fatal', prepend `error: ' to the message. Prepend `warning: ' to warning messages, whatever the setting of -Werror. * lib/Automake/Channels.pm (partial): Move up definition. (_format_message): Emit `header' and `footer' strings only with the first resp. last part of a set of partial messages. * lib/Automake/ChannelDefs.pm: Add missing '1;' statement at the end of the module. (Automake::ChannelDefs): Setup warning channels with header `warning: ', error and fatal messages with header `error: '. * tests/condinc2.test, tests/ltinstloc.test: Adjust expected error messages. * tests/comment5.test: Likewise. Also, include stack notes should not start with `error:'. * tests/location.test: Likewise. Also, try both -Werror and -Wno-error. * NEWS: Update. Report by Bruno Haible. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Diffstat (limited to 'lib/Automake/ChannelDefs.pm')
-rw-r--r--lib/Automake/ChannelDefs.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Automake/ChannelDefs.pm b/lib/Automake/ChannelDefs.pm
index ce6bf2927..26ef575f8 100644
--- a/lib/Automake/ChannelDefs.pm
+++ b/lib/Automake/ChannelDefs.pm
@@ -163,6 +163,10 @@ register_channel 'verb', type => 'debug', silent => 1, uniq_part => UP_NONE,
ordered => 0;
register_channel 'note', type => 'debug', silent => 0;
+setup_channel_type 'warning', header => 'warning: ';
+setup_channel_type 'error', header => 'error: ';
+setup_channel_type 'fatal', header => 'error: ';
+
=head2 FUNCTIONS
=over 4
@@ -381,6 +385,8 @@ Written by Alexandre Duret-Lutz E<lt>F<adl@gnu.org>E<gt>.
=cut
+1;
+
### Setup "GNU" style for perl-mode and cperl-mode.
## Local Variables:
## perl-indent-level: 2