From: Jonathan Nieder Date: Sat, 04 Sep 2010 16:34:07 GMT Subject: Re: [RFC/PATCH] Avoid TAGS/tags warning from GNU Make Message-ID: <20100904163407.GA31513@burratino> In-Reply-To: <7v8w3hxz81.fsf@alter.siamese.dyndns.org> Junio C Hamano wrote: > +++ b/Makefile > @@ -390,6 +390,8 @@ SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \ > $(patsubst %.py,%,$(SCRIPT_PYTHON)) \ > git-instaweb > > +ETAGS_TARGET = TAGS [...] > @@ -1954,9 +1957,9 @@ info: > pdf: > $(MAKE) -C Documentation pdf > > -TAGS: > - $(RM) TAGS > - $(FIND) . -name '*.[hcS]' -print | xargs etags -a > +$(ETAGS_TARGET): > + $(RM) $(ETAGS_TARGET) > + $(FIND) . -name '*.[hcS]' -print | xargs etags -a -o $(ETAGS_TARGET) Nice. > @@ -2252,7 +2255,7 @@ endif > > .PHONY: all install clean strip > .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell > -.PHONY: FORCE TAGS tags cscope > +.PHONY: FORCE cscope make: `tags' is up to date. How about something like this squashed in or on top? -- 8< -- Subject: Makefile: regenerate editor tag files when asked tags and TAGS depend on all source files, but it is easier to teach the Makefile to regenerate them every time the user asks than to declare that. Signed-off-by: Jonathan Nieder --- Makefile | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 52252d4..205fe58 100644 --- a/Makefile +++ b/Makefile @@ -1955,11 +1955,11 @@ info: pdf: $(MAKE) -C Documentation pdf -$(ETAGS_TARGET): +$(ETAGS_TARGET): FORCE $(RM) $(ETAGS_TARGET) $(FIND) . -name '*.[hcS]' -print | xargs etags -a -o $(ETAGS_TARGET) -tags: +tags: FORCE $(RM) tags $(FIND) . -name '*.[hcS]' -print | xargs ctags -a -- 1.7.2.3