mirror of
git://git.sv.gnu.org/autoconf
synced 2025-01-24 10:54:42 +08:00
* lib/Autom4te/FileUtils.pm (&find_file): Walk the @include in
forward order. * lib/Autom4te/ChannelDefs.pm: Doc typos. (&parse_warnings): Accept a list of warning requests. (&usage): Return a string, not a side effect. (cross): New warning category.
This commit is contained in:
parent
59b8e13699
commit
561b426684
@ -1,3 +1,12 @@
|
|||||||
|
2003-08-21 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
|
* lib/Autom4te/FileUtils.pm (&find_file): Walk the @include in
|
||||||
|
forward order.
|
||||||
|
* lib/Autom4te/ChannelDefs.pm: Doc typos.
|
||||||
|
(&parse_warnings): Accept a list of warning requests.
|
||||||
|
(&usage): Return a string, not a side effect.
|
||||||
|
(cross): New warning category.
|
||||||
|
|
||||||
2003-08-21 Akim Demaille <akim@epita.fr>
|
2003-08-21 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* lib/Autom4te/Configure_ac.pm (&find_configure_ac)
|
* lib/Autom4te/Configure_ac.pm (&find_configure_ac)
|
||||||
|
@ -27,7 +27,7 @@ Autom4te::ChannelDefs - channel definitions for Automake and helper functions
|
|||||||
|
|
||||||
use Autom4te::ChannelDefs;
|
use Autom4te::ChannelDefs;
|
||||||
|
|
||||||
Autom4te::ChannelDefs::usage ();
|
print Autom4te::ChannelDefs::usage (), "\n";
|
||||||
prog_error ($MESSAGE, [%OPTIONS]);
|
prog_error ($MESSAGE, [%OPTIONS]);
|
||||||
error ($WHERE, $MESSAGE, [%OPTIONS]);
|
error ($WHERE, $MESSAGE, [%OPTIONS]);
|
||||||
error ($MESSAGE);
|
error ($MESSAGE);
|
||||||
@ -36,7 +36,7 @@ Autom4te::ChannelDefs - channel definitions for Automake and helper functions
|
|||||||
verb ($MESSAGE, [%OPTIONS]);
|
verb ($MESSAGE, [%OPTIONS]);
|
||||||
switch_warning ($CATEGORY);
|
switch_warning ($CATEGORY);
|
||||||
parse_WARNINGS ();
|
parse_WARNINGS ();
|
||||||
parse_warning ($OPTION, $ARGUMENT);
|
parse_warnings ($OPTION, $ARGUMENT);
|
||||||
Autom4te::ChannelDefs::set_strictness ($STRICTNESS_NAME);
|
Autom4te::ChannelDefs::set_strictness ($STRICTNESS_NAME);
|
||||||
|
|
||||||
=head1 DESCRIPTION
|
=head1 DESCRIPTION
|
||||||
@ -80,7 +80,7 @@ Errors related to GNU Standards.
|
|||||||
|
|
||||||
=item C<error-gnu/warn>
|
=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>
|
=item C<error-gnits>
|
||||||
|
|
||||||
@ -90,6 +90,10 @@ Errors related to GNITS Standards (silent by default).
|
|||||||
|
|
||||||
Internal errors. Use C<&prog_error> to send messages over this channel.
|
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>
|
=item C<gnu>
|
||||||
|
|
||||||
Warnings related to GNU Coding Standards.
|
Warnings related to GNU Coding Standards.
|
||||||
@ -142,6 +146,7 @@ register_channel 'automake', type => 'fatal', backtrace => 1,
|
|||||||
"####################\n"),
|
"####################\n"),
|
||||||
footer => "\nPlease contact <bug-automake\@gnu.org>.";
|
footer => "\nPlease contact <bug-automake\@gnu.org>.";
|
||||||
|
|
||||||
|
register_channel 'cross', type => 'warning', silent => 1;
|
||||||
register_channel 'gnu', type => 'warning';
|
register_channel 'gnu', type => 'warning';
|
||||||
register_channel 'obsolete', type => 'warning', silent => 1;
|
register_channel 'obsolete', type => 'warning', silent => 1;
|
||||||
register_channel 'override', type => 'warning', silent => 1;
|
register_channel 'override', type => 'warning', silent => 1;
|
||||||
@ -158,13 +163,14 @@ register_channel 'note', type => 'debug', silent => 0;
|
|||||||
|
|
||||||
=item C<usage ()>
|
=item C<usage ()>
|
||||||
|
|
||||||
Display warning categories.
|
Return the warning category descriptions.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub usage ()
|
sub usage ()
|
||||||
{
|
{
|
||||||
print "Warning categories include:
|
return "Warning categories include:
|
||||||
|
`cross' cross compilation issues
|
||||||
`gnu' GNU coding standards (default in gnu and gnits modes)
|
`gnu' GNU coding standards (default in gnu and gnits modes)
|
||||||
`obsolete' obsolete features or constructions
|
`obsolete' obsolete features or constructions
|
||||||
`override' user redefinitions of Automake rules or variables
|
`override' user redefinitions of Automake rules or variables
|
||||||
@ -174,8 +180,7 @@ sub usage ()
|
|||||||
`all' all the warnings
|
`all' all the warnings
|
||||||
`no-CATEGORY' turn off warnings in CATEGORY
|
`no-CATEGORY' turn off warnings in CATEGORY
|
||||||
`none' turn off all the warnings
|
`none' turn off all the warnings
|
||||||
`error' treat warnings as errors
|
`error' treat warnings as errors";
|
||||||
";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
=item C<prog_error ($MESSAGE, [%OPTIONS])>
|
=item C<prog_error ($MESSAGE, [%OPTIONS])>
|
||||||
@ -234,7 +239,7 @@ sub verb ($;%)
|
|||||||
=item C<switch_warning ($CATEGORY)>
|
=item C<switch_warning ($CATEGORY)>
|
||||||
|
|
||||||
If C<$CATEGORY> is C<mumble>, turn on channel C<mumble>.
|
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.
|
Else handle C<all> and C<none> for completeness.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
@ -293,21 +298,22 @@ sub parse_WARNINGS ()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
=item C<parse_warning ($OPTION, $ARGUMENT)>
|
=item C<parse_warnings ($OPTION, @ARGUMENT)>
|
||||||
|
|
||||||
Parse the argument of C<--warning=CATEGORY> or C<-WCATEGORY>.
|
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 a argument to C<Getopt>.
|
||||||
|
|
||||||
=cut
|
=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'"
|
msg 'unsupported', "unknown warning category `$cat'"
|
||||||
if switch_warning $cat;
|
if switch_warning $cat;
|
||||||
|
@ -83,7 +83,7 @@ sub find_file ($@)
|
|||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach my $path (reverse @include)
|
foreach my $path (@include)
|
||||||
{
|
{
|
||||||
return File::Spec->canonpath (File::Spec->catfile ($path, $filename))
|
return File::Spec->canonpath (File::Spec->catfile ($path, $filename))
|
||||||
if -e File::Spec->catfile ($path, $filename)
|
if -e File::Spec->catfile ($path, $filename)
|
||||||
|
Loading…
Reference in New Issue
Block a user