DORMANTno replies

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

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-03-28 02:19:13
Subsystem: kernel build + files below scripts/ (unless maintained elsewhere), the rest · Maintainers: Nathan Chancellor, Nicolas Schier, Linus Torvalds

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help