1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 1994-2017 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 <https://www.gnu.org/licenses/>.
17 # Read a list of newline-separated strings from the standard input,
18 # and print each of them once, without duplicates. Input order is
20 am__uniquify_input = $(AWK) '\
21 BEGIN { nonempty = 0; } \
22 { items[$$0] = 1; nonempty = 1; } \
23 END { if (nonempty) { for (i in items) print i; }; } \
26 # Make sure the list of sources is unique. This is necessary because,
27 # e.g., the same source file might be shared among _SOURCES variables
28 # for different programs/libraries.
29 am__define_uniq_tagged_files = \
30 list='$(am__tagged_files)'; \
31 unique=`for i in $$list; do \
32 ## Handle VPATH correctly.
33 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
34 done | $(am__uniquify_input)`
40 ID: $(am__tagged_files)
41 $(am__define_uniq_tagged_files); mkid -fID $$unique
51 AM_RECURSIVE_TARGETS += TAGS
52 RECURSIVE_TARGETS += tags-recursive
59 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
60 ## We use the positional parameters to build the subdir list with
61 ## absolute names, without the need to worry about white space in `pwd`.
64 ## Exuberant Ctags wants --etags-include,
65 ## GNU Etags --include
66 ## Furthermore Exuberant Ctags 5.5.4 fails to create TAGS files
67 ## when no files are supplied, despite any --etags-include option.
68 ## A workaround is to pass '.' as a file. This is what $empty_fix is for.
69 ?SUBDIRS? if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
70 ?SUBDIRS? include_option=--etags-include; \
71 ?SUBDIRS? empty_fix=.; \
73 ?SUBDIRS? include_option=--include; \
74 ?SUBDIRS? empty_fix=; \
76 ?SUBDIRS? list='$(SUBDIRS)'; for subdir in $$list; do \
77 ## Do nothing if we're trying to look in '.'.
78 ?SUBDIRS? if test "$$subdir" = .; then :; else \
79 ?SUBDIRS? test ! -f $$subdir/TAGS || \
80 ## Note that the = is mandatory for --etags-include.
81 ?SUBDIRS? set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
84 $(am__define_uniq_tagged_files); \
85 ## Remove the 'x' we added first:
87 ## Make sure we have something to run etags on.
88 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
89 test -n "$$unique" || unique=$$empty_fix; \
90 if test $$# -gt 0; then \
91 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
94 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
100 ## --------------- ##
102 ## --------------- ##
107 AM_RECURSIVE_TARGETS += CTAGS
108 RECURSIVE_TARGETS += ctags-recursive
109 ctags: ctags-recursive
115 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
116 $(am__define_uniq_tagged_files); \
117 ## Make sure we have something to run ctags on.
118 test -z "$(CTAGS_ARGS)$$unique" \
119 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
123 ## --------------- ##
125 ## --------------- ##
129 here=`$(am__cd) $(top_builddir) && pwd` \
130 && $(am__cd) $(top_srcdir) \
131 && gtags -i $(GTAGS_ARGS) "$$here"
140 .PHONY: cscope clean-cscope
141 AM_RECURSIVE_TARGETS += cscope
143 test ! -s cscope.files \
144 || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
147 cscope.files: clean-cscope cscopelist
151 RECURSIVE_TARGETS += cscopelist-recursive
152 cscopelist: cscopelist-recursive
154 cscopelist: cscopelist-am
157 cscopelist-am: $(am__tagged_files)
158 list='$(am__tagged_files)'; \
159 case "$(srcdir)" in \
160 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
161 *) sdir=$(subdir)/$(srcdir) ;; \
163 for i in $$list; do \
164 if test -f "$$i"; then \
165 echo "$(subdir)/$$i"; \
169 done >> $(top_builddir)/cscope.files
176 .PHONY distclean-am: distclean-tags
179 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
181 -rm -f cscope.out cscope.in.out cscope.po.out cscope.files