* configure.in: Updated to 1.4b and released.
[automake.git] / tags.am
blob3bc80e8a44e8ee1dbad93f38ff9e4dc315deb636
1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
3 ## Free Software Foundation, Inc.
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 2, or (at your option)
8 ## any later version.
10 ## This program is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 ## GNU General Public License for more details.
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program; if not, write to the Free Software
17 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18 ## 02111-1307, USA.
19 tags: TAGS
21 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
22 ## Make sure the list of sources is unique.
23         list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
24         unique=`for i in $$list; do \
25 ## Handle VPATH correctly.
26             if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
27           done | \
28           $(AWK) '    { files[$$0] = 1; } \
29                END { for (i in files) print i; }'`; \
30         mkid -fID $$unique $(LISP)
32 TAGS: @DIRS@ $(HEADERS) $(SOURCES) @CONFIG@ $(TAGS_DEPENDENCIES) \
33                 $(TAGS_FILES) $(LISP)
34         tags=; \
35         here=`pwd`; \
36 SUBDIRS list='$(SUBDIRS)'; for subdir in $$list; do \
37 ## Do nothing if we're trying to look in `.'.
38 SUBDIRS   if test "$$subdir" = .; then :; else \
39 SUBDIRS     test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
40 SUBDIRS   fi; \
41 SUBDIRS done; \
42 ## Make sure the list of sources is unique.
43         list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
44         unique=`for i in $$list; do \
45 ## Handle VPATH correctly.
46             if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
47           done | \
48           $(AWK) '    { files[$$0] = 1; } \
49                END { for (i in files) print i; }'`; \
50 ## Make sure we have something to run etags on.
51         test -z "$(ETAGS_ARGS)@CONFIG@$$unique$(LISP)$$tags" \
52           || etags $(ETAGS_ARGS) $$tags @CONFIG@ $$unique $(LISP)
54 ## Support `Global' tags.
55 GTAGS:
56         here=`CDPATH=: && cd $(top_builddir) && pwd` \
57           && cd $(top_srcdir) \
58           && gtags -i $$here