git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Makefile: add QUIET_GEN to "tags" and "TAGS" targets

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Mar 28, 2021, 02:18 UTC
Message-ID
<patch-1.1-afd0c18ca86-20210328T021814Z-avarab@gmail.com>

Don't show the very verbose $(FIND_SOURCE_FILES) command on every "make TAGS" invocation. Let's also use the "cmd >x+ && mv x+ x" pattern here so we don't momentarily clobber the file.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 Makefile | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 55c8035fa80..f317af1b602 100644
--- a/Makefile
+++ b/Makefile
@@ -2690,12 +2690,15 @@ FIND_SOURCE_FILES = ( \
 	)
 
 $(ETAGS_TARGET): FORCE
-	$(RM) $(ETAGS_TARGET)
-	$(FIND_SOURCE_FILES) | xargs etags -a -o $(ETAGS_TARGET)
+	echo $(ALL_SOURCE_FILES)
+	$(QUIET_GEN)$(RM) "$(ETAGS_TARGET)+" && \
+	$(FIND_SOURCE_FILES) | xargs etags -a -o "$(ETAGS_TARGET)+" && \
+	mv "$(ETAGS_TARGET)+" "$(ETAGS_TARGET)"
 
 tags: FORCE
-	$(RM) tags
-	$(FIND_SOURCE_FILES) | xargs ctags -a
+	$(QUIET_GEN)$(RM) tags+ && \
+	$(FIND_SOURCE_FILES) | xargs ctags -a -o tags+ && \
+	mv tags+ tags
 
 cscope:
 	$(RM) cscope*
-- 
2.31.1.442.g6c06c9fe35c
Next: Junio C Hamano
Message 1 of 3 in “Makefile: add QUIET_GEN to "tags" and "TAGS" targets”
  1. Makefile: add QUIET_GEN to "tags" and "TAGS" targetsÆvar Arnfjörð Bjarmason, Mar 28, 2021
  2. Junio C HamanoMar 28, 2021
  3. Junio C HamanoMar 31, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.