From: Stefano Lattarini Date: Sat, 9 Jun 2012 09:57:00 +0000 (+0200) Subject: Merge branch 'master' into ng/master X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b207dc15733e1b0bf4a1927204d41351f03f42c2;p=thirdparty%2Fautomake.git Merge branch 'master' into ng/master * master: cleanup: simplify subroutine '&saw_extension' cleanup: remove subroutine '&saw_sources_p' cleanup: remove unused '&count_files_for_language' subroutine automake: simplify '&saw_sources_p' tags: look at $(am__tagged_files) to decide whether to activate tags: new var $(am__tagged_files) to list all files to run taggers on tags (cscope): also process $(TAGS_FILES) tags (ID, cscope): also process config header (if any) + Extra non-trivial edits: * automake.in (handle_tags): Adjust the call to 'define_variable' for the variable '$(am__tagged_files)' to the different signature we have in Automake-NG, i.e., "define_variable($VAR, $WHERE, @VALUE)" rather than "define_variable($VAR, $VALUE, $WHERE)". Signed-off-by: Stefano Lattarini --- b207dc15733e1b0bf4a1927204d41351f03f42c2 diff --cc automake.in index ed98397c9,f88d94dc0..0b4cf2430 --- a/automake.in +++ b/automake.in @@@ -1290,11 -1301,13 +1290,11 @@@ sub handle_language { # Include auto-dep code. Don't include it if DEP_FILES would # be empty. - if (&saw_sources_p (0) && keys %dep_files) + if (keys %extension_seen && keys %dep_files) { # Set location of depcomp. - &define_variable ('depcomp', - "\$(SHELL) $am_config_aux_dir/depcomp", - INTERNAL); - &define_variable ('am__depfiles_maybe', 'depfiles', INTERNAL); + define_variable ('depcomp', INTERNAL, + '$(SHELL) $(am__config_aux_dir)/depcomp'); require_conf_file ("$am_file.am", FOREIGN, 'depcomp'); @@@ -3380,6 -3607,23 +3380,23 @@@ sub handle_dat # 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', - '$(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)' - . "@config", INTERNAL); ++ define_variable ('am__tagged_files', INTERNAL, ++ qw/$(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)/, ++ @config); + my @tag_deps = (); my @ctag_deps = (); my @cscope_deps = (); @@@ -3414,27 -3660,14 +3431,13 @@@ . "\tdone\n"); push (@cscope_deps, 'cscopelist-recursive'); &depend ('.PHONY', 'cscopelist-recursive'); - &depend ('.MAKE', 'cscopelist-recursive'); } - if (&saw_sources_p (1) - || var ('ETAGS_ARGS') - || @tag_deps) + if (rvar('am__tagged_files')->value_as_list_recursive + || var ('ETAGS_ARGS') || @tag_deps) { - 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); - } - } $output_rules .= &file_contents ('tags', new Automake::Location, - CONFIG => "@config", TAGSDIRS => "@tag_deps", CTAGSDIRS => "@ctag_deps", CSCOPEDIRS => "@cscope_deps");