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 <jrnieder@xxxxxxxxx> --- 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 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html