From: Stefano Lattarini Date: Mon, 30 Jul 2012 12:12:11 +0000 (+0200) Subject: [ng] automake: move processing of config-header rules in its own function X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=021ad59476299c4819a6980a65c6b286e65a51f0;p=thirdparty%2Fautomake.git [ng] automake: move processing of config-header rules in its own function This is a pure refactoring with no semantic changes intended. It will only be useful for future changes. * automake.in (handle_configure): Move definition of $(AM_CONF_HEADERS) from here ... (handle_config_headers): ... to this new function, which will also ensure that the $(AM_CONFIG_HEADERS) will always be defined (albeit possibly to an empty value). (generate_makefile): Call the new variable. Signed-off-by: Stefano Lattarini --- diff --git a/automake.in b/automake.in index 698549fa7..57be393f8 100644 --- a/automake.in +++ b/automake.in @@ -3556,7 +3556,23 @@ sub rewrite_inputs_into_dependencies ($@) return @res; } - +sub handle_config_headers () +{ + my @config_h; + foreach my $spec (@config_headers) + { + my ($out, @ins) = split_config_file_spec ($spec); + if ($relative_dir eq dirname ($out)) + { + push @config_h, basename ($out); + } + else + { + push @config_h, "\$(top_builddir)/$out"; + } + } + define_variable ("AM_CONFIG_HEADERS", INTERNAL, @config_h); +} # &handle_configure ($MAKEFILE_AM, $MAKEFILE_IN, $MAKEFILE, @INPUTS) # ------------------------------------------------------------------ @@ -3658,22 +3674,6 @@ sub handle_configure ($$$@) } } - my @config_h; - foreach my $spec (@config_headers) - { - my ($out, @ins) = split_config_file_spec ($spec); - if ($relative_dir eq dirname ($out)) - { - push @config_h, basename ($out); - } - else - { - push @config_h, "\$(top_builddir)/$out"; - } - } - define_variable ("AM_CONFIG_HEADERS", INTERNAL, @config_h) - if @config_h; - # Now look for other files in this directory which must be remade # by config.status, and generate rules for them. my @actual_other_files = (); @@ -6865,6 +6865,7 @@ sub generate_makefile ($$) almost_verbatim ('am-dir'); + handle_config_headers; handle_configure ($makefile_am, $makefile_in, $makefile, @inputs); handle_gettext; handle_libraries;