From: Stefano Lattarini Date: Mon, 30 Jul 2012 12:22:56 +0000 (+0200) Subject: [ng] automake: remove useless code duplication X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27bbb0b1ef0a8273b262730263a5f31a39924b0e;p=thirdparty%2Fautomake.git [ng] automake: remove useless code duplication This is a pure refactoring with no semantic changes intended. * automake.in (handle_all_and_check, handle_tags): Do not re-calculate the list of "local" input or output header files (specified by AC_CONFIG_HEADERS in configure.ac); that is already saved in the internal make variables '$(am.config-hdr.local)' and '$(am.config-hdr.local.in)'. Simply use these variables instead. Signed-off-by: Stefano Lattarini --- diff --git a/automake.in b/automake.in index 234324a3f..ceee1c89b 100644 --- a/automake.in +++ b/automake.in @@ -3180,22 +3180,9 @@ sub handle_data # Handle TAGS. sub handle_tags { - my @config; - foreach my $spec (@config_headers) - { - my ($out, @ins) = split_config_file_spec ($spec); - foreach my $in (@ins) - { - # If the config header source is in this directory, - # require it. - push @config, basename ($in) - if $relative_dir eq dirname ($in); - } - } - define_variable ('am__tagged_files', INTERNAL, - qw/$(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)/, - @config); + qw/$(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) + $(am.config-hdr.local.in)/); if (rvar('am__tagged_files')->value_as_list_recursive || var ('ETAGS_ARGS') || var ('SUBDIRS')) @@ -3900,18 +3887,9 @@ sub handle_footer # Generate "make all" and "make check" rules. sub handle_all_and_check () { - my @local_headers = (); - foreach my $spec (@config_headers) - { - my ($out, @ins) = split_config_file_spec ($spec); - push (@local_headers, basename ($out)) - if dirname ($out) eq $relative_dir; - } - almost_verbatim ('all-target', 'ALL-DEPS' => "@all", - 'LOCAL-HEADERS' => "@local_headers"); - + 'LOCAL-HEADERS' => '$(am.config-hdr.local)'); almost_verbatim ('check-target'); }