diff options
author | Roland McGrath <roland@gnu.org> | 2001-12-22 23:43:37 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2001-12-22 23:43:37 +0000 |
commit | c2ca7271a715811c6f56dd1b206b230183bd8c3d (patch) | |
tree | 1c27c0117ba33072578c385481364bd46f3cfc85 | |
parent | 845d4b6af842e4c6815a4789595f1e7802be1b33 (diff) |
2001-11-15 Neal H Walfield <neal@cs.uml.edu>
* 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).
-rw-r--r-- | Makeconf | 23 | ||||
-rw-r--r-- | Makefile | 2 |
2 files changed, 18 insertions, 7 deletions
@@ -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) @@ -94,7 +94,7 @@ install-headers: $(addsuffix -install-headers,$(lib-subdirs) \ $(working-prog-subdirs)\ $(other-subdirs)) -TAGS: $(addsuffix -TAGS,$(prog-subdirs) $(lib-subdirs)) +TAGS: $(addsuffix -TAGS,$(working-prog-subdirs) $(lib-subdirs)) etags -o $@ $(patsubst %-TAGS,-i %/TAGS,$^) ## Targets used by the main targets above. |