################################################################
-# Handle AUTOMAKE_OPTIONS variable. Return 1 on error, 0 otherwise.
+# Handle AUTOMAKE_OPTIONS variable. Return 0 on error, 1 otherwise.
sub handle_options ()
{
my $var = var ('AUTOMAKE_OPTIONS');
my @options = map { { option => $_->[1], where => $_->[0] } }
$var->value_as_list_recursive (cond_filter => TRUE,
location => 1);
- return 1 if process_option_list (@options);
+ return 0 unless process_option_list (@options);
}
if ($strictness == GNITS)
set_option ('check-news', INTERNAL);
}
- return 0;
+ return 1;
}
# shadow_unconditionally ($varname, $where)
{
my @opts = split (' ', $args[1]);
@opts = map { { option => $_, where => $where } } @opts;
- exit $exit_code if process_global_option_list (@opts);
+ exit $exit_code unless process_global_option_list (@opts);
}
}
elsif ($macro eq 'AM_MAINTAINER_MODE')
$relative_dir = dirname ($makefile);
read_main_am_file ($makefile_am, $makefile_in);
- if (handle_options)
+ if (not handle_options)
{
# Process buffered warnings.
flush_messages;
having the same precedence; i.e., do not call it twice for two options
from C<AM_INIT_AUTOMAKE>.
-Return 1 on error, 0 otherwise.
+Return 0 on error, 1 otherwise.
=cut
# Obsolete (and now removed) de-ANSI-fication support.
error ($where,
"automatic de-ANSI-fication support has been removed");
- return 1;
+ return 0;
}
# TODO: Remove this special check in Automake 3.0.
elsif ($_ eq 'cygnus')
{
error $where, "support for Cygnus-style trees has been removed";
- return 1;
+ return 0;
}
# TODO: Remove this special check in Automake 3.0.
elsif ($_ eq 'dist-lzma')
{
error ($where, "support for lzma-compressed distribution " .
"archives has been removed");
- return 1;
+ return 0;
}
# TODO: Make this a fatal error in Automake 2.0.
elsif ($_ eq 'dist-shar')
}
elsif ($_ eq 'tar-v7' || $_ eq 'tar-ustar' || $_ eq 'tar-pax')
{
- return 1
- unless _option_is_from_configure ($_, $where);
+ if (not _option_is_from_configure ($_, $where))
+ {
+ return 0;
+ }
for my $opt ('tar-v7', 'tar-ustar', 'tar-pax')
{
next
if $opt eq $_ or ! exists $options->{$opt};
error ($where,
"options '$_' and '$opt' are mutually exclusive");
- return 1;
+ return 0;
}
}
elsif (/^\d+\.\d+(?:\.\d+)?[a-z]?(?:-[A-Za-z0-9]+)?$/)
{
error ($where, "require Automake $_, but have $VERSION",
uniq_scope => US_GLOBAL);
- return 1;
+ return 0;
}
}
elsif (/^(?:--warnings=|-W)(.*)$/)
elsif (! _is_valid_easy_option $_)
{
error ($where, "option '$_' not recognized");
- return 1;
+ return 0;
}
}
# We process warnings here, so that any explicitly-given warning setting
"unknown warning category '$w->{'cat'}'"
if switch_warning $w->{cat};
}
- return 0;
+ return 1;
}
sub process_option_list (@)