Merge branch 'maint'
[platform/upstream/automake.git] / lib / am / tags.am
index 7fa75c9..eadb9c0 100644 (file)
@@ -1,6 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003,
-## 2004, 2007, 2008, 2009  Free Software Foundation, Inc.
+## Copyright (C) 1994-2012 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -19,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; \
@@ -42,19 +41,16 @@ 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; \
        here=`pwd`; \
-## It is tempting to use if/endif here, but don't: the previous
-## backslash will cause bad results (automake doesn't `see' the `if').
 ## Exuberant Ctags wants --etags-include,
 ## GNU Etags             --include
 ## Furthermore Exuberant Ctags 5.5.4 fails to create TAGS files
 ## when no files are supplied, despite any --etags-include option.
-## A workaround is to pass `.' as a file.  This is what $empty_fix is for.
+## A workaround is to pass '.' as a file.  This is what $empty_fix is for.
 ?SUBDIRS?      if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
 ?SUBDIRS?        include_option=--etags-include; \
 ?SUBDIRS?        empty_fix=.; \
@@ -63,7 +59,7 @@ TAGS: %TAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_DEPENDENCIES) \
 ?SUBDIRS?        empty_fix=; \
 ?SUBDIRS?      fi; \
 ?SUBDIRS?      list='$(SUBDIRS)'; for subdir in $$list; do \
-## Do nothing if we're trying to look in `.'.
+## Do nothing if we're trying to look in '.'.
 ?SUBDIRS?        if test "$$subdir" = .; then :; else \
 ?SUBDIRS?          test ! -f $$subdir/TAGS || \
 ## Note that the = is mandatory for --etags-include.
@@ -71,14 +67,14 @@ 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; \
          done | \
          $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
              END { if (nonempty) { for (i in files) print i; }; }'`; \
-## Remove the `x' we added first:
+## Remove the 'x' we added first:
        shift; \
 ## Make sure we have something to run etags on.
        if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
@@ -93,9 +89,9 @@ TAGS: %TAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_DEPENDENCIES) \
        fi
 
 
-## ------------- ##
-## vi-style tags ##
-## ------------- ##
+## --------------- ##
+## vi-style tags ##
+## --------------- ##
 
 CTAGS = ctags
 .PHONY: CTAGS ctags
@@ -104,13 +100,12 @@ AM_RECURSIVE_TARGETS += ctags CTAGS
 endif %?SUBDIRS%
 ctags: CTAGS
 
-## We have a dummy name here because `tags' has already been in use
+## 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; \
@@ -124,7 +119,7 @@ CTAGS: %CTAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_DEPENDENCIES) \
 
 
 ## --------------- ##
-## `Global' tags.  ##
+## "Global tags".  ##
 ## --------------- ##
 
 .PHONY: GTAGS
@@ -156,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) ;; \