Skip to content

Commit 3c80fcb

Browse files
avargitster
authored andcommitted
Makefile: add QUIET_GEN to "tags" and "TAGS" targets
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 48bf2fa commit 3c80fcb

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Makefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2669,12 +2669,14 @@ FIND_SOURCE_FILES = ( \
26692669
)
26702670

26712671
$(ETAGS_TARGET): FORCE
2672-
$(RM) $(ETAGS_TARGET)
2673-
$(FIND_SOURCE_FILES) | xargs etags -a -o $(ETAGS_TARGET)
2672+
$(QUIET_GEN)$(RM) "$(ETAGS_TARGET)+" && \
2673+
$(FIND_SOURCE_FILES) | xargs etags -a -o "$(ETAGS_TARGET)+" && \
2674+
mv "$(ETAGS_TARGET)+" "$(ETAGS_TARGET)"
26742675

26752676
tags: FORCE
2676-
$(RM) tags
2677-
$(FIND_SOURCE_FILES) | xargs ctags -a
2677+
$(QUIET_GEN)$(RM) tags+ && \
2678+
$(FIND_SOURCE_FILES) | xargs ctags -a -o tags+ && \
2679+
mv tags+ tags
26782680

26792681
cscope:
26802682
$(RM) cscope*

0 commit comments

Comments
 (0)