automake-ng
[Top][All Lists]
Advanced

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

Re: [Automake-NG] [PATCH 2/5] [ng] vars: separate config headers in two


From: Stefano Lattarini
Subject: Re: [Automake-NG] [PATCH 2/5] [ng] vars: separate config headers in two vars (local and non-local ones)
Date: Mon, 30 Jul 2012 15:46:57 +0200

On 07/30/2012 03:28 PM, Stefano Lattarini wrote:
> Where the "local" are those which are in the same subdirectory of the
> Makefile.am being currently processed, and the "non-local" ones are
> not (and thus need to be prepended with $(top_builddir)).
> 
> * automake.in (handle_config_headers): Define two new make variables
> 'am.config-hdr.local' and 'am.config-hdr.non-local'.  Accordingly,
> define 'AM_CONFIG_HEADERS' as the union of them.
> 
> Signed-off-by: Stefano Lattarini <address@hidden>
> ---
>  automake.in | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/automake.in b/automake.in
> index 57be393..490226c 100644
> --- a/automake.in
> +++ b/automake.in
> @@ -3558,20 +3558,23 @@ sub rewrite_inputs_into_dependencies ($@)
>  
>  sub handle_config_headers ()
>  {
> -  my @config_h;
> +  my (@config_h_local, @config_h_nonlocal);
>    foreach my $spec (@config_headers)
>      {
>        my ($out, @ins) = split_config_file_spec ($spec);
>        if ($relative_dir eq dirname ($out))
>       {
> -       push @config_h, basename ($out);
> +       push @config_h_local, basename ($out);
>       }
>        else
>       {
> -       push @config_h, "\$(top_builddir)/$out";
> +       push @config_h_nonlocal, "\$(top_builddir)/$out";
>       }
>      }
> -  define_variable ("AM_CONFIG_HEADERS", INTERNAL, @config_h);
> +  define_variable ('am.config-hdr.local', INTERNAL, @config_h_local);
> +  define_variable ('am.config-hdr.non-local', INTERNAL, @config_h_nonlocal);
> +  define_variable ('AM_CONFIG_HEADERS', INTERNAL,
> +                   qw/$(am.config-hdr.local) $(am.config-hdr.global)/);
>  }
>
Yikes, this is borked :-(  Consider this squashed in:

diff --git a/automake.in b/automake.in
index 490226c..b4cbce8 100644
--- a/automake.in
+++ b/automake.in
@@ -3574,7 +3574,7 @@ sub handle_config_headers ()
   define_variable ('am.config-hdr.local', INTERNAL, @config_h_local);
   define_variable ('am.config-hdr.non-local', INTERNAL, @config_h_nonlocal);
   define_variable ('AM_CONFIG_HEADERS', INTERNAL,
-                   qw/$(am.config-hdr.local) $(am.config-hdr.global)/);
+                   qw/$(am.config-hdr.local) $(am.config-hdr.non-local)/);
 }

Sorry for the noise,
  Stefano




reply via email to

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