]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Merge branch 'master' into ng/master
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 9 Jun 2012 09:57:00 +0000 (11:57 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 9 Jun 2012 09:59:54 +0000 (11:59 +0200)
* 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 <stefano.lattarini@gmail.com>
1  2 
automake.in

diff --cc automake.in
index ed98397c954dda2141409a0237f620864cb483f7,f88d94dc0a60f9de1f05ebf49663d295d4dfd5a6..0b4cf2430d9bfc3ac6b8c385232da0832e3de587
@@@ -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
  {
 -    define_variable ('am__tagged_files',
 -                     '$(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)'
 -                     . "@config", INTERNAL);
+     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);
      my @tag_deps = ();
      my @ctag_deps = ();
      my @cscope_deps = ();
                          . "\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");