automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12.1


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12.1-334-gb207dc1
Date: Sat, 09 Jun 2012 11:09:03 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=b207dc15733e1b0bf4a1927204d41351f03f42c2

The branch, ng/master has been updated
       via  b207dc15733e1b0bf4a1927204d41351f03f42c2 (commit)
       via  995e5ff0da20c9b500ecdd2eee2f793b6a27e980 (commit)
       via  5f54e9ecd61a681f861e139b28d1704544dcf42f (commit)
       via  2fbd43d6fd5277a234d5b0caf231af246d1c0ac8 (commit)
       via  be7cd4faef59ecf9dd6f25231542594f64a35709 (commit)
       via  11a645aa91e606eb9c1bdd67ad1f7a10584f100c (commit)
       via  712c083e54d3d7e9971d918d516e19dc383bdcb5 (commit)
       via  cb4977815bc4661f97bee27565ae4475b912281f (commit)
       via  32fab2739b960d4dfa393e8d88160f29e9a4b169 (commit)
      from  39ae8d503f3a5116513af73f934f1b9a4e6a21e4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b207dc15733e1b0bf4a1927204d41351f03f42c2
Merge: 39ae8d5 995e5ff
Author: Stefano Lattarini <address@hidden>
Date:   Sat Jun 9 11:57:00 2012 +0200

    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 <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 automake.in    |  106 +++++++++++---------------------------------------------
 lib/am/tags.am |   18 ++++-----
 2 files changed, 29 insertions(+), 95 deletions(-)

diff --git a/automake.in b/automake.in
index ed98397..0b4cf24 100644
--- a/automake.in
+++ b/automake.in
@@ -1290,7 +1290,7 @@ sub handle_languages
     {
        # 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', INTERNAL,
@@ -3380,6 +3380,23 @@ 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);
+
     my @tag_deps = ();
     my @ctag_deps = ();
     my @cscope_deps = ();
@@ -3416,25 +3433,11 @@ sub handle_tags
        &depend ('.PHONY', '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");
@@ -5375,76 +5378,9 @@ sub resolve_linker
 sub saw_extension
 {
     my ($ext) = @_;
-    if (! defined $extension_seen{$ext})
-    {
-       $extension_seen{$ext} = 1;
-    }
-    else
-    {
-       ++$extension_seen{$ext};
-    }
-}
-
-# Return the number of files seen for a given language.  Knows about
-# special cases we care about.  FIXME: this is hideous.  We need
-# something that involves real language objects.  For instance yacc
-# and yaccxx could both derive from a common yacc class which would
-# know about the strange ylwrap requirement.  (Or better yet we could
-# just not support legacy yacc!)
-sub count_files_for_language
-{
-    my ($name) = @_;
-
-    my @names;
-    if ($name eq 'yacc' || $name eq 'yaccxx')
-    {
-       @names = ('yacc', 'yaccxx');
-    }
-    elsif ($name eq 'lex' || $name eq 'lexxx')
-    {
-       @names = ('lex', 'lexxx');
-    }
-    else
-    {
-       @names = ($name);
-    }
-
-    my $r = 0;
-    foreach $name (@names)
-    {
-       my $lang = $languages{$name};
-       foreach my $ext (@{$lang->extensions})
-       {
-           $r += $extension_seen{$ext}
-               if defined $extension_seen{$ext};
-       }
-    }
-
-    return $r
+    $extension_seen{$ext} = 1;
 }
 
-# Called to ask whether source files have been seen . If HEADERS is 1,
-# headers can be included.
-sub saw_sources_p
-{
-    my ($headers) = @_;
-
-    # count all the sources
-    my $count = 0;
-    foreach my $val (values %extension_seen)
-    {
-       $count += $val;
-    }
-
-    if (!$headers)
-    {
-       $count -= count_files_for_language ('header');
-    }
-
-    return $count > 0;
-}
-
-
 # register_language (%ATTRIBUTE)
 # ------------------------------
 # Register a single language.
diff --git a/lib/am/tags.am b/lib/am/tags.am
index fccacca..eadb9c0 100644
--- a/lib/am/tags.am
+++ b/lib/am/tags.am
@@ -18,9 +18,9 @@
 ## ID.  ##
 ## ---- ##
 
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ID: $(am__tagged_files)
 ## Make sure the list of sources is unique.
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       list='$(am__tagged_files)'; \
        unique=`for i in $$list; do \
 ## Handle VPATH correctly.
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
@@ -41,8 +41,7 @@ AM_RECURSIVE_TARGETS += tags TAGS
 endif %?SUBDIRS%
 tags: TAGS
 
-TAGS: %TAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
+TAGS: %TAGSDIRS% $(TAGS_DEPENDENCIES) $(am__tagged_files)
 ## We use the positional parameters to build the subdir list with
 ## absolute names, without the need to worry about white space in `pwd`.
        set x; \
@@ -68,7 +67,7 @@ TAGS: %TAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% 
$(TAGS_DEPENDENCIES) \
 ?SUBDIRS?        fi; \
 ?SUBDIRS?      done; \
 ## Make sure the list of sources is unique.
-       list='$(SOURCES) $(HEADERS) %CONFIG% $(LISP) $(TAGS_FILES)'; \
+       list='$(am__tagged_files)'; \
        unique=`for i in $$list; do \
 ## Handle VPATH correctly.
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
@@ -104,10 +103,9 @@ ctags: CTAGS
 ## We have a dummy name here because 'tags' has already been in use
 ## for a long time to mean Emacs-style tags.  Oops.  This means the
 ## dependencies here are useless.
-CTAGS: %CTAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
+CTAGS: %CTAGSDIRS% $(TAGS_DEPENDENCIES) $(am__tagged_files)
 ## Make sure the list of sources is unique.
-       list='$(SOURCES) $(HEADERS) %CONFIG% $(LISP) $(TAGS_FILES)'; \
+       list='$(am__tagged_files)'; \
        unique=`for i in $$list; do \
 ## Handle VPATH correctly.
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
@@ -153,8 +151,8 @@ cscope.files: clean-cscope %CSCOPEDIRS% cscopelist
 endif %?TOPDIR_P%
 
 .PHONY: cscopelist
-cscopelist: %CSCOPEDIRS% $(HEADERS) $(SOURCES) $(LISP)
-       list='$(SOURCES) $(HEADERS) $(LISP)'; \
+cscopelist: %CSCOPEDIRS% $(am__tagged_files)
+       list='$(am__tagged_files)'; \
        case "$(srcdir)" in \
          [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
          *) sdir=$(subdir)/$(srcdir) ;; \


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]