From: Jonathan Nieder <jrnieder@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>,
git@vger.kernel.org, Fredrik Kuivinen <frekui@gmail.com>,
Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: [RFC/PATCH] Avoid TAGS/tags warning from GNU Make
Date: Sat, 4 Sep 2010 11:34:07 -0500 [thread overview]
Message-ID: <20100904163407.GA31513@burratino> (raw)
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 <jrnieder@gmail.com>
---
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
prev parent reply other threads:[~2010-09-04 16:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-04 9:03 [RFC/PATCH] Avoid TAGS/tags warning from GNU Make Jonathan Nieder
2010-09-04 9:41 ` Matthieu Moy
2010-09-04 16:14 ` Junio C Hamano
2010-09-04 16:34 ` Jonathan Nieder [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100904163407.GA31513@burratino \
--to=jrnieder@gmail.com \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=frekui@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=johannes.schindelin@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).