From 3c80fcb5910eddf9e347e637fce2b6fbc6d7dcbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Sun, 28 Mar 2021 04:18:34 +0200 Subject: [PATCH] Makefile: add QUIET_GEN to "tags" and "TAGS" targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don't show the very verbose $(FIND_SOURCE_FILES) command on every "make TAGS" invocation. Let's use "generate into temporary and rename to the final file, after seeing the command that generated the output finished successfully" pattern, to avoid leaving a file with an incorrect output generated by a failed command. Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index f3dc217832..d3274f62b4 100644 --- a/Makefile +++ b/Makefile @@ -2669,12 +2669,14 @@ FIND_SOURCE_FILES = ( \ ) $(ETAGS_TARGET): FORCE - $(RM) $(ETAGS_TARGET) - $(FIND_SOURCE_FILES) | xargs etags -a -o $(ETAGS_TARGET) + $(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*