1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 1994-2012 Free Software Foundation, Inc.
4 ## This program is free software; you can redistribute it and/or modify
5 ## it under the terms of the GNU General Public License as published by
6 ## the Free Software Foundation; either version 2, or (at your option)
9 ## This program is distributed in the hope that it will be useful,
10 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ## GNU General Public License for more details.
14 ## You should have received a copy of the GNU General Public License
15 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
21 ID: $(am__tagged_files)
22 ## Make sure the list of sources is unique.
23 list='$(am__tagged_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; \
28 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
29 END { if (nonempty) { for (i in files) print i; }; }'`; \
40 AM_RECURSIVE_TARGETS += tags TAGS
44 TAGS: %TAGSDIRS% $(TAGS_DEPENDENCIES) $(am__tagged_files)
45 ## We use the positional parameters to build the subdir list with
46 ## absolute names, without the need to worry about white space in `pwd`.
49 ## Exuberant Ctags wants --etags-include,
50 ## GNU Etags --include
51 ## Furthermore Exuberant Ctags 5.5.4 fails to create TAGS files
52 ## when no files are supplied, despite any --etags-include option.
53 ## A workaround is to pass '.' as a file. This is what $empty_fix is for.
54 ?SUBDIRS? if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
55 ?SUBDIRS? include_option=--etags-include; \
56 ?SUBDIRS? empty_fix=.; \
58 ?SUBDIRS? include_option=--include; \
59 ?SUBDIRS? empty_fix=; \
61 ?SUBDIRS? list='$(SUBDIRS)'; for subdir in $$list; do \
62 ## Do nothing if we're trying to look in '.'.
63 ?SUBDIRS? if test "$$subdir" = .; then :; else \
64 ?SUBDIRS? test ! -f $$subdir/TAGS || \
65 ## Note that the = is mandatory for --etags-include.
66 ?SUBDIRS? set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
69 ## Make sure the list of sources is unique.
70 list='$(am__tagged_files)'; \
71 unique=`for i in $$list; do \
72 ## Handle VPATH correctly.
73 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
75 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
76 END { if (nonempty) { for (i in files) print i; }; }'`; \
77 ## Remove the 'x' we added first:
79 ## Make sure we have something to run etags on.
80 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
81 test -n "$$unique" || unique=$$empty_fix; \
82 if test $$# -gt 0; then \
83 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
86 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
99 AM_RECURSIVE_TARGETS += ctags CTAGS
103 ## We have a dummy name here because 'tags' has already been in use
104 ## for a long time to mean Emacs-style tags. Oops. This means the
105 ## dependencies here are useless.
106 CTAGS: %CTAGSDIRS% $(TAGS_DEPENDENCIES) $(am__tagged_files)
107 ## Make sure the list of sources is unique.
108 list='$(am__tagged_files)'; \
109 unique=`for i in $$list; do \
110 ## Handle VPATH correctly.
111 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
113 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
114 END { if (nonempty) { for (i in files) print i; }; }'`; \
115 ## Make sure we have something to run ctags on.
116 test -z "$(CTAGS_ARGS)$$unique" \
117 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
121 ## --------------- ##
123 ## --------------- ##
127 here=`$(am__cd) $(top_builddir) && pwd` \
128 && $(am__cd) $(top_srcdir) \
129 && gtags -i $(GTAGS_ARGS) "$$here"
139 .PHONY: cscope clean-cscope
140 AM_RECURSIVE_TARGETS += cscope
143 test ! -s cscope.files \
144 || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
149 cscope.files: clean-cscope %CSCOPEDIRS% cscopelist
154 cscopelist: %CSCOPEDIRS% $(am__tagged_files)
155 list='$(am__tagged_files)'; \
156 case "$(srcdir)" in \
157 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
158 *) sdir=$(subdir)/$(srcdir) ;; \
160 for i in $$list; do \
161 if test -f "$$i"; then \
162 echo "$(subdir)/$$i"; \
166 done >> $(top_builddir)/cscope.files
173 .PHONY distclean-am: distclean-tags
176 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
178 -rm -f cscope.out cscope.in.out cscope.po.out cscope.files