summaryrefslogtreecommitdiff
path: root/automake.in
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2010-12-20 18:29:50 +0100
committerStefano Lattarini <stefano.lattarini@gmail.com>2011-01-15 15:27:16 +0100
commit1609491e95df66d8119ada02eeeb4070ca3a9a28 (patch)
tree04b2f6f8dc28f8908cb675b6a5b8a306116a3501 /automake.in
parentf90a06c1eb001d03366b3bd50699d0672ca2cbdb (diff)
downloadautomake-1609491e95df66d8119ada02eeeb4070ca3a9a28.tar.gz
Warnings win over strictness in AUTOMAKE_OPTIONS.
Ensure that, for what concerns the options specified in AUTOMAKE_OPTIONS, explicitly-defined warnings always take precedence over implicit strictness-implied warnings. This finally fixes Automake bug#7669 a.k.a. PR/547. * automake.in (handle_options): Call 'process_option_list' only once per set of options. * lib/Automake/Options.pm (process_global_option_list, process_option_list): Add sanity checks. ($_options_processed, $_global_options_processed): New internal variables, used by the sanity checks above. * tests/warnings-win-over-strictness.test: Extend.
Diffstat (limited to 'automake.in')
-rw-r--r--automake.in11
1 files changed, 4 insertions, 7 deletions
diff --git a/automake.in b/automake.in
index 5d5af933d..ef3b8a65b 100644
--- a/automake.in
+++ b/automake.in
@@ -1244,13 +1244,10 @@ sub handle_options
msg_var ('unsupported', $var,
"`AUTOMAKE_OPTIONS' cannot have conditional contents");
}
- foreach my $locvals ($var->value_as_list_recursive (cond_filter => TRUE,
- location => 1))
- {
- my ($where, $value) = @$locvals;
- return 1 if process_option_list ({ option => $value,
- where => $where});
- }
+ my @options = map { { option => $_->[1], where => $_->[0] } }
+ $var->value_as_list_recursive (cond_filter => TRUE,
+ location => 1);
+ return 1 if process_option_list (@options);
}
# Override portability-recursive warning.