1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
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)
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., 51 Franklin Street, Fifth Floor, Boston, MA
24 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
25 ## Make sure the list of sources is unique.
26 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
27 unique=`for i in $$list; do \
28 ## Handle VPATH correctly.
29 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
31 $(AWK) ' { files[$$0] = 1; } \
32 END { for (i in files) print i; }'`; \
44 TAGS: %TAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_DEPENDENCIES) \
48 ## It is tempting to use if/endif here, but don't: the previous
49 ## backslash will cause bad results (automake doesn't `see' the `if').
50 ## Exuberant Ctags wants --etags-include,
51 ## GNU Etags --include
52 ## Furthermore Exuberant Ctags 5.5.4 fails to create TAGS files
53 ## when no files are supplied, despite any --etags-include option.
54 ## A workaround is to pass `.' as a file. This is what $empty_fix is for.
55 ?SUBDIRS? if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
56 ?SUBDIRS? include_option=--etags-include; \
57 ?SUBDIRS? empty_fix=.; \
59 ?SUBDIRS? include_option=--include; \
60 ?SUBDIRS? empty_fix=; \
62 ?SUBDIRS? list='$(SUBDIRS)'; for subdir in $$list; do \
63 ## Do nothing if we're trying to look in `.'.
64 ?SUBDIRS? if test "$$subdir" = .; then :; else \
65 ?SUBDIRS? test ! -f $$subdir/TAGS || \
66 ## Note that the = is mandatory for --etags-include.
67 ?SUBDIRS? tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
70 ## Make sure the list of sources is unique.
71 list='$(SOURCES) $(HEADERS) %CONFIG% $(LISP) $(TAGS_FILES)'; \
72 unique=`for i in $$list; do \
73 ## Handle VPATH correctly.
74 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
76 $(AWK) ' { files[$$0] = 1; } \
77 END { for (i in files) print i; }'`; \
78 ## Make sure we have something to run etags on.
79 if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
80 test -n "$$unique" || unique=$$empty_fix; \
81 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
94 ## We have a dummy name here because `tags' has already been in use
95 ## for a long time to mean Emacs-style tags. Oops. This means the
96 ## dependencies here are useless.
97 CTAGS: %CTAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_DEPENDENCIES) \
101 ## Make sure the list of sources is unique.
102 list='$(SOURCES) $(HEADERS) %CONFIG% $(LISP) $(TAGS_FILES)'; \
103 unique=`for i in $$list; do \
104 ## Handle VPATH correctly.
105 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
107 $(AWK) ' { files[$$0] = 1; } \
108 END { for (i in files) print i; }'`; \
109 ## Make sure we have something to run ctags on.
110 test -z "$(CTAGS_ARGS)$$tags$$unique" \
111 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
115 ## --------------- ##
117 ## --------------- ##
121 here=`$(am__cd) $(top_builddir) && pwd` \
122 && cd $(top_srcdir) \
123 && gtags -i $(GTAGS_ARGS) $$here
130 .PHONY distclean-am: distclean-tags
133 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags