summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2013-05-10 23:08:28 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2013-05-10 23:08:28 +0200
commit117ddf8d25420691edbd065a85f64cd8a283e1c0 (patch)
tree4ed2ddda4ef869823b02799c79b825c2a74efa8f /lib
parentf7ef16feb40d3ea8b126ec29b31dae5cec31faf0 (diff)
downloadautomake-117ddf8d25420691edbd065a85f64cd8a283e1c0.tar.gz
options: more consistency in use of return statuses to report errors
* lib/Automake/Options.pm (_option_must_be_from_configure): By giving a proper return status here. (_process_option_list): And using it here. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Automake/Options.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm
index dcdc119af..b6464ce52 100644
--- a/lib/Automake/Options.pm
+++ b/lib/Automake/Options.pm
@@ -245,6 +245,7 @@ Return 1 on error, 0 otherwise.
=cut
+# $BOOL
# _option_must_be_from_configure ($OPTION, $WHERE)
# ----------------------------------------------
# Check that the $OPTION given in location $WHERE is specified with
@@ -252,13 +253,15 @@ Return 1 on error, 0 otherwise.
sub _option_must_be_from_configure ($$)
{
my ($opt, $where)= @_;
- return
+ return 1
if $where->get =~ /^configure\./;
error $where,
"option '$opt' can only be used as argument to AM_INIT_AUTOMAKE\n" .
"but not in AUTOMAKE_OPTIONS makefile statements";
+ return 0;
}
+# $BOOL
# _is_valid_easy_option ($OPTION)
# -------------------------------
# Explicitly recognize valid automake options that require no
@@ -357,7 +360,8 @@ sub _process_option_list (\%@)
}
elsif ($_ eq 'tar-v7' || $_ eq 'tar-ustar' || $_ eq 'tar-pax')
{
- _option_must_be_from_configure ($_, $where);
+ return 1
+ unless _option_must_be_from_configure ($_, $where);
for my $opt ('tar-v7', 'tar-ustar', 'tar-pax')
{
next