From c2ca7271a715811c6f56dd1b206b230183bd8c3d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 22 Dec 2001 23:43:37 +0000 Subject: 2001-11-15 Neal H Walfield * Makeconf (TAGS) [configured]: Create tags for MiG generated files. * Makefile (TAGS): Generate dependencies respecting broken code markers, i.e. based on $(working-prog-subdirs) and not $(prog-subdirs). --- Makeconf | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'Makeconf') diff --git a/Makeconf b/Makeconf index d59d2147..b27cd480 100644 --- a/Makeconf +++ b/Makeconf @@ -379,19 +379,30 @@ endif # TAGS files ifneq ($(dir),.) -ifeq ($(SRCS),) -TAGS: $(OTHERTAGS) -ifeq ($(OTHERTAGS),) +ifdef configured +ifneq ($(OBJS:.o=.d),) +DEP_SRCS = sed -e 's/^.*://' -e 's/ \\$$//' | tr ' ' '\012'| \ + sed -n -e 's@^$(srcdir)@&@p' -e 's@^[^/]@&@p' | sort -ur +TAGSFILES=$(OBJS:.o=.d) $(OTHERTAGS) +else +TAGSFILES=$(OTHERTAGS) +endif +else +TAGSFILES=$(SRCS) $(OTHERTAGS) +endif + +TAGS: $(TAGSFILES) +ifeq ($(strip($(TAGSFILES))),) # no tags, but parent will include this file, so make empty one. > $@ else - etags -o $@ $^ -endif +ifdef DEP_SRCS + cat $(OBJS:.o=.d) | $(DEP_SRCS) | etags -o $@ - $(OTHERTAGS) else -TAGS: $(SRCS) $(OTHERTAGS) etags -o $@ $^ endif endif +endif # Cleaning ifeq ($(clean),yes) -- cgit v1.2.3