automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 7/9] Warnings win over strictness in AUTOMAKE_OPTIONS.


From: Ralf Wildenhues
Subject: Re: [PATCH 7/9] Warnings win over strictness in AUTOMAKE_OPTIONS.
Date: Thu, 13 Jan 2011 21:15:32 +0100
User-agent: Mutt/1.5.20 (2010-08-04)

* Stefano Lattarini wrote on Tue, Jan 04, 2011 at 06:52:32PM CET:
> Warnings win over strictness in AUTOMAKE_OPTIONS.
> 
> This change ensures that, for what concerns the options specified

s/This change ensures/Ensure/

> 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' (from
> Automake::Option) in way that ensures that explicit warnings are
> parsed only after the strictness level has been set.

Call 'process_option_list' only once per set of options.
(Shorter, and also clearer IMVHO.)

> * tests/warnings-win-over-strictness.test: Extend.

> --- a/automake.in
> +++ b/automake.in
> @@ -1246,13 +1246,11 @@ 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 (@locvals, @options);
> +      @locvals = $var->value_as_list_recursive (cond_filter => TRUE,
> +                                             location => 1);
> +      @options = map { { option => $_->[1], where => $_->[0] } } @locvals;

Why not just

         my @options = map { option => $_->[1], where => $_->[0] }
                           $var->value_as_list_recursive (cond_filter => TRUE,
                                                          location => 1);

(but this is nit-picking)?

> +      return 1 if process_option_list (@options);
>      }
>  
>    # Override portability-recursive warning.

OK with that fixed.

Thanks,
Ralf



reply via email to

[Prev in Thread] Current Thread [Next in Thread]