summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2013-05-10 22:50:54 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2013-05-10 22:50:54 +0200
commit6e486c5db436b0145280806655b17a462d2f827b (patch)
tree9cc5cd188a5c1feaab817db88b0797893a9a0bef /lib
parentb636268a12d1a0fdee3eb4ac0f8e9a1eaf45da80 (diff)
downloadautomake-6e486c5db436b0145280806655b17a462d2f827b.tar.gz
options: consistently use return statuses to report errors
* lib/Automake/Options.pm (_process_option_list): Here. (process_option_list, process_global_option_list): Remove redundant use of 'return'. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Automake/Options.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm
index bcbfd1757..d578c9bba 100644
--- a/lib/Automake/Options.pm
+++ b/lib/Automake/Options.pm
@@ -320,17 +320,20 @@ sub _process_option_list (\%@)
# Obsolete (and now removed) de-ANSI-fication support.
error ($where,
"automatic de-ANSI-fication support has been removed");
+ return 1;
}
# TODO: Remove this special check in Automake 3.0.
elsif ($_ eq 'cygnus')
{
error $where, "support for Cygnus-style trees has been removed";
+ return 1;
}
# 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;
}
# TODO: Make this a fatal error in Automake 2.0.
elsif ($_ eq 'dist-shar')
@@ -361,7 +364,7 @@ sub _process_option_list (\%@)
if $opt eq $_ or ! exists $options->{$opt};
error ($where,
"options '$_' and '$opt' are mutually exclusive");
- last;
+ return 1;
}
}
elsif (/^\d+\.\d+(?:\.\d+)?[a-z]?(?:-[A-Za-z0-9]+)?$/)
@@ -403,7 +406,7 @@ sub process_option_list (@)
prog_error "local options already processed"
if $_options_processed;
$_options_processed = 1;
- return _process_option_list (%_options, @_);
+ _process_option_list (%_options, @_);
}
sub process_global_option_list (@)
@@ -411,7 +414,7 @@ sub process_global_option_list (@)
prog_error "global options already processed"
if $_global_options_processed;
$_global_options_processed = 1;
- return _process_option_list (%_global_options, @_);
+ _process_option_list (%_global_options, @_);
}
=item C<set_strictness ($name)>