Hello, several of the lib/Automake/*.pm files are used by Autoconf as lib/Autom4te/*.pm. Why isn't ChannelDefs.pm among them.
autoconf/.../ChannelDefs.pm has accumulated several small changes which should go to lib/Automake/ The only question is about -Wcross. Shall Automake have this new category of warnings, even though it does not use it currently? Attached please find a patch which would sync the two clones. Are you willing to apply? Have a nice day, Stepan Kasal
2008-03-14 Stepan Kasal <[EMAIL PROTECTED]> * lib/Automake/ChannelDefs.pm: Import changes from Autoconf. --- lib/Automake/ChannelDefs.pm 2008-02-05 15:10:22.000000000 +0100 +++ lib/Automake/ChannelDefs.pm 2008-03-14 15:03:05.904510600 +0100 @@ -25,7 +25,7 @@ use Automake::ChannelDefs; - Automake::ChannelDefs::usage (); + print Automake::ChannelDefs::usage (), "\n"; prog_error ($MESSAGE, [%OPTIONS]); error ($WHERE, $MESSAGE, [%OPTIONS]); error ($MESSAGE); @@ -34,12 +34,12 @@ verb ($MESSAGE, [%OPTIONS]); switch_warning ($CATEGORY); parse_WARNINGS (); - parse_warning ($OPTION, $ARGUMENT); + parse_warnings ($OPTION, $ARGUMENT); Automake::ChannelDefs::set_strictness ($STRICTNESS_NAME); =head1 DESCRIPTION -This packages defines channels that can be used in Automake to +This package defines channels that can be used in Automake to output diagnostics and other messages (via C<msg()>). It also defines some helper function to enable or disable these channels, and some shorthand function to output on specific channels. @@ -78,7 +78,7 @@ =item C<error-gnu/warn> -Errors related to GNU Standards that should be warnings in `foreign' mode. +Errors related to GNU Standards that should be warnings in "foreign" mode. =item C<error-gnits> @@ -88,6 +88,10 @@ Internal errors. Use C<&prog_error> to send messages over this channel. +=item C<cross> + +Constructs compromising the cross-compilation of the package. + =item C<gnu> Warnings related to GNU Coding Standards. @@ -140,6 +144,7 @@ "####################\n"), footer => "\nPlease contact <[EMAIL PROTECTED]>."; +register_channel 'cross', type => 'warning', silent => 1; register_channel 'gnu', type => 'warning'; register_channel 'obsolete', type => 'warning', silent => 1; register_channel 'override', type => 'warning', silent => 1; @@ -156,13 +161,14 @@ =item C<usage ()> -Display warning categories. +Return the warning category descriptions. =cut sub usage () { - print "Warning categories include: + return "Warning categories include: + `cross' cross compilation issues `gnu' GNU coding standards (default in gnu and gnits modes) `obsolete' obsolete features or constructions `override' user redefinitions of Automake rules or variables @@ -172,8 +178,7 @@ `all' all the warnings `no-CATEGORY' turn off warnings in CATEGORY `none' turn off all the warnings - `error' treat warnings as errors -"; + `error' treat warnings as errors"; } =item C<prog_error ($MESSAGE, [%OPTIONS])> @@ -232,7 +237,7 @@ =item C<switch_warning ($CATEGORY)> If C<$CATEGORY> is C<mumble>, turn on channel C<mumble>. -If it's C<no-mumble>, turn C<mumble> off. +If it is C<no-mumble>, turn C<mumble> off. Else handle C<all> and C<none> for completeness. =cut @@ -291,21 +296,22 @@ } } -=item C<parse_warning ($OPTION, $ARGUMENT)> +=item C<parse_warnings ($OPTION, @ARGUMENT)> Parse the argument of C<--warning=CATEGORY> or C<-WCATEGORY>. -C<$OPTIONS> is C<"--warning"> or C<"-W">, C<$ARGUMENT> is C<CATEGORY>. +C<$OPTIONS> is C<"--warning"> or C<"-W">, C<@ARGUMENT> is a list of +C<CATEGORY>. -This is meant to be used as a argument to C<Getopt>. +This can be used as an argument to C<Getopt>. =cut -sub parse_warnings ($$) +sub parse_warnings ($@) { - my ($opt, $categories) = @_; + my ($opt, @categories) = @_; - foreach my $cat (split (',', $categories)) + foreach my $cat (map { split ',' } @categories) { msg 'unsupported', "unknown warning category `$cat'" if switch_warning $cat;