3 # Copyright (C) 1992 Free Software Foundation, Inc.
4 # This file is part of the GNU C Library.
6 # The GNU C Library is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Library General Public License
8 # as published by the Free Software Foundation; either version 2 of
9 # the License, or (at your option) any later version.
11 # The GNU C Library is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # Library General Public License for more details.
16 # You should have received a copy of the GNU Library General Public
17 # License along with the GNU C Library; see the file COPYING.LIB. If
18 # not, write to the Free Software Foundation, Inc., 675 Mass Ave,
19 # Cambridge, MA 02139, USA.
25 include $(..)Makeconfig
28 tags_sources = $(all-sources) $(all-headers)
31 sysdep-dirs := $(addprefix $(sysdep_dir)/,$(sysdirs))
33 # Find all sysdep dirs there are, but putting the ones
34 # we are configured to use first and preserving their order.
35 all-dirs := $(objdir) \
38 $(filter-out $(sysdep-dirs),\
40 $(shell find $(sysdep_dir) -type d -print)\
43 # Find all the subdirs there are, but putting the ones
44 # we are configured to use first and preserving their order.
46 subdirs := $(subdirs) \
47 $(filter-out $(subdirs),\
48 $(shell cat $(wildcard $(addsuffix /Subdirs,\
51 all-dist = $(shell cat /dev/null $(wildcard $(filter %.c %.h %.S %.s,\
52 $(all-dirs:%=%/Dist))))
53 tags_sources = $(all-sources) $(all-headers) $(all-dist)
56 # All different versions of $(sources), preserving the configured sysdep
58 all-sources = $(wildcard $(foreach file,$(sources),\
60 $(foreach dir,$(all-dirs),\
62 $(dir)/$(file:.c=.S) \
63 $(dir)/$(file:.c=.s))))
65 all-headers = $(wildcard $(foreach file,$(headers),\
67 $(foreach dir,$(all-dirs),$(dir)/$(file))))
69 tags_sources := $(strip $(tags_sources))
78 # Note that this uses the -i switch, and thus requires v19 etags.
80 $(subdirs:%=-i %/TAGS) \
81 $(filter-out subdir_TAGS,$^)
83 .PHONY: subdir_TAGS $(subdirs:%=%/TAGS)
84 subdir_TAGS: $(subdirs:%=%/TAGS)
86 $(MAKE) -C $(@D) no_deps=t $(@F)