automake-commit
[Top][All Lists]
Advanced

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

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


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.12.1-53-g995e5ff
Date: Sat, 09 Jun 2012 08:19:48 +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=995e5ff0da20c9b500ecdd2eee2f793b6a27e980

The branch, master has been updated
       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  e92bd2e745cc8273654b51cc1c3712211e9b3def (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 995e5ff0da20c9b500ecdd2eee2f793b6a27e980
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jun 7 19:14:30 2012 +0200

    cleanup: simplify subroutine '&saw_extension'
    
    * automake.in (saw_extension): Now that we use the '%extension_seen'
    hash only as a set (it's keys being its elements), we can simplify
    the implementation of this function accordingly.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 5f54e9ecd61a681f861e139b28d1704544dcf42f
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jun 7 19:14:12 2012 +0200

    cleanup: remove subroutine '&saw_sources_p'
    
    * automake.in (saw_sources_p): Remove, its implementation is now so
    trivial that it's easier to inline it into ...
    (handle_languages): ... it's only caller.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 2fbd43d6fd5277a234d5b0caf231af246d1c0ac8
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jun 7 19:13:39 2012 +0200

    cleanup: remove unused '&count_files_for_language' subroutine
    
    * automake.in (count_files_for_language): Remove.  Its only remaining
    caller (saw_sources_p) has stopped calling it in the previous commit.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit be7cd4faef59ecf9dd6f25231542594f64a35709
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jun 7 19:12:43 2012 +0200

    automake: simplify '&saw_sources_p'
    
    This is just a minor cleanup.  No semantic change is intended.
    
    * automake.in (saw_sources_p): Since its now-only caller calls it with
    the '0' argument, remove the code paths that assumed the argument could
    be '1', and assume no arguments.
    (handle_languages): Drop the arguments '0' in the '&saw_sources_p'
    invocation.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 11a645aa91e606eb9c1bdd67ad1f7a10584f100c
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jun 7 19:12:11 2012 +0200

    tags: look at $(am__tagged_files) to decide whether to activate
    
    This is just a preparatory refactoring in view of future changes.
    
    * automake.in (handle_tags): To decide whether to include the tags rules,
    rely on whether the automake-defined variable $(SOURCES) is non-empty,
    rather than on the fact that '&saw_sources(1)' returns true.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 712c083e54d3d7e9971d918d516e19dc383bdcb5
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jun 7 20:13:37 2012 +0200

    tags: new var $(am__tagged_files) to list all files to run taggers on
    
    This change reduce code duplication a little, and will be needed by
    future simplifications.
    
    * automake.in (handle_tags): Define a new 'am__tagged_files' private
    make variable that lists all files to run taggers (mkid, cscope, ctags,
    etc) on.  Drop the now-useless transform '%CONFIG%' when including
    'tags.am'.
    * lib/am/tags.am: Use it in several recipes and dependencies list to
    reduce code duplication.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit cb4977815bc4661f97bee27565ae4475b912281f
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jun 7 19:41:37 2012 +0200

    tags (cscope): also process $(TAGS_FILES)
    
    * lib/am/tags.am (cscopelist): Also scan the files (if any) listed in
    the '$(TAGS_FILES) variable, for consistency by what is done by the
    'ID', 'TAGS' and 'CTAGS' rules.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 32fab2739b960d4dfa393e8d88160f29e9a4b169
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jun 7 19:19:15 2012 +0200

    tags (ID, cscope): also process config header (if any)
    
    * lib/am/tags.am (cscopelist, ID): Also scan the file given by the
    '%CONFIG%' transform, for consistency by what is done by the 'TAGS'
    and 'CTAGS' rules.
    
    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 22fbbd7..f88d94d 100644
--- a/automake.in
+++ b/automake.in
@@ -1301,7 +1301,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',
@@ -3607,6 +3607,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',
+                     '$(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)'
+                     . "@config", INTERNAL);
+
     my @tag_deps = ();
     my @ctag_deps = ();
     my @cscope_deps = ();
@@ -3646,25 +3663,11 @@ sub handle_tags
        &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");
@@ -6025,76 +6028,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]