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 <[email protected]> --- 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)/); } # &handle_configure ($MAKEFILE_AM, $MAKEFILE_IN, $MAKEFILE, @INPUTS) -- 1.7.12.rc0
