From: Stefano Lattarini Date: Mon, 20 Dec 2010 15:59:08 +0000 (+0100) Subject: Change signature of 'Automake::Options::_process_option_list()'. X-Git-Tag: ng-0.5a~248^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=v1.11-622-gf90a06c;p=thirdparty%2Fautomake.git Change signature of 'Automake::Options::_process_option_list()'. This only modifies internal details in the automake implementation, bearing no externally visible effect, but preparing the way for the final fix of Automake bug#7669 a.k.a. PR/547. * lib/Automake/Options.pm (_process_option_list): Now accepts as arguments a list of hash references with keys 'option' and 'where', where 'option' is an option as might occur in AUTOMAKE_OPTIONS or M_INIT_AUTOMAKE, and 'where' is the location where that occurred. (process_option_list, process_global_option_list): Update. * automake.in (handle_options, scan_autoconf_traces): Update. --- diff --git a/ChangeLog b/ChangeLog index fbe930ac2..6c65edf38 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,17 @@ 2011-01-15 Stefano Lattarini + For PR automake/547: + Change signature of 'Automake::Options::_process_option_list()'. + This only modifies internal details in the automake implementation, + bearing no externally visible effect, but preparing the way for the + final fix of Automake bug#7669 a.k.a. PR/547. + * lib/Automake/Options.pm (_process_option_list): Accept as + arguments a list of hash references with keys 'option' and 'where', + where 'option' is an option as might occur in AUTOMAKE_OPTIONS or + AM_INIT_AUTOMAKE, and 'where' is the location where it occurred. + (process_option_list, process_global_option_list): Updated. + * automake.in (handle_options, scan_autoconf_traces): Update. + Add more tests about AUTOMAKE_OPTIONS. In view of soon-to-follow refactorings (still in the pursuit of a fix for Automake bug#7669 a.k.a. PR/547), add some more tests on diff --git a/automake.in b/automake.in index e80a7361b..5d5af933d 100644 --- a/automake.in +++ b/automake.in @@ -1247,8 +1247,9 @@ sub handle_options foreach my $locvals ($var->value_as_list_recursive (cond_filter => TRUE, location => 1)) { - my ($loc, $value) = @$locvals; - return 1 if (process_option_list ($loc, $value)) + my ($where, $value) = @$locvals; + return 1 if process_option_list ({ option => $value, + where => $where}); } } @@ -5469,9 +5470,9 @@ sub scan_autoconf_traces ($) } elsif (defined $args[1]) { - exit $exit_code - if (process_global_option_list ($where, - split (' ', $args[1]))); + my @opts = split (' ', $args[1]); + @opts = map { { option => $_, where => $where } } @opts; + exit $exit_code if process_global_option_list (@opts); } } elsif ($macro eq 'AM_MAINTAINER_MODE') diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm index a3607c3f7..9f221784a 100644 --- a/lib/Automake/Options.pm +++ b/lib/Automake/Options.pm @@ -222,12 +222,14 @@ sub unset_global_option ($) } -=item C +=item C -=item C +=item C -Process Automake's option lists. C<@options> should be a list of -words, as they occur in C or C. +Process Automake's option lists. C<@list> should be a list of hash +references with keys C