From: Stefano Lattarini Date: Mon, 30 Jul 2012 12:19:00 +0000 (+0200) Subject: [ng] vars: separate config headers in two vars (local and non-local ones) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e35306b40107b333c978a5c484cd3af4a67fc525;p=thirdparty%2Fautomake.git [ng] vars: separate config headers in two vars (local and non-local ones) 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 --- diff --git a/automake.in b/automake.in index 57be393f8..b4cbce87c 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.non-local)/); } # &handle_configure ($MAKEFILE_AM, $MAKEFILE_IN, $MAKEFILE, @INPUTS)