]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] vars: separate config headers in two vars (local and non-local ones)
authorStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 30 Jul 2012 12:19:00 +0000 (14:19 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 30 Jul 2012 15:06:00 +0000 (17:06 +0200)
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 <stefano.lattarini@gmail.com>
automake.in

index 57be393f8b8c046f0043417386dd7ceecdde6283..b4cbce87cc59c59bae75d2ee0bf8e315f3956c1a 100644 (file)
@@ -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.non-local)/);
 }
 
 # &handle_configure ($MAKEFILE_AM, $MAKEFILE_IN, $MAKEFILE, @INPUTS)