1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 1994-2024 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
50 AM_RECURSIVE_TARGETS += TAGS
51 RECURSIVE_TARGETS += tags-recursive
58 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
59 ## We use the positional parameters to build the subdir list with
60 ## absolute names, without the need to worry about white space in `pwd`.
63 ## Exuberant Ctags wants --etags-include,
64 ## GNU Etags --include
65 ## Furthermore Exuberant Ctags 5.5.4 fails to create TAGS files
66 ## when no files are supplied, despite any --etags-include option.
67 ## A workaround is to pass '.' as a file. This is what $empty_fix is for.
68 ?SUBDIRS? if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
69 ?SUBDIRS? include_option=--etags-include; \
70 ?SUBDIRS? empty_fix=.; \
72 ?SUBDIRS? include_option=--include; \
73 ?SUBDIRS? empty_fix=; \
75 ?SUBDIRS? list='$(SUBDIRS)'; for subdir in $$list; do \
76 ## Do nothing if we're trying to look in '.'.
77 ?SUBDIRS? if test "$$subdir" = .; then :; else \
78 ?SUBDIRS? test ! -f $$subdir/TAGS || \
79 ## Note that the = is mandatory for --etags-include.
80 ?SUBDIRS? set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
83 $(am__define_uniq_tagged_files); \
84 ## Remove the 'x' we added first:
86 ## Make sure we have something to run etags on.
87 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
88 test -n "$$unique" || unique=$$empty_fix; \
89 if test $$# -gt 0; then \
90 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
93 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
101 ## --------------- ##
105 AM_RECURSIVE_TARGETS += CTAGS
106 RECURSIVE_TARGETS += ctags-recursive
107 ctags: ctags-recursive
113 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
114 $(am__define_uniq_tagged_files); \
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"
137 .PHONY: cscope clean-cscope
138 AM_RECURSIVE_TARGETS += cscope
140 test ! -s cscope.files \
141 || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
144 cscope.files: clean-cscope cscopelist
148 RECURSIVE_TARGETS += cscopelist-recursive
149 cscopelist: cscopelist-recursive
151 cscopelist: cscopelist-am
154 cscopelist-am: $(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