]> git.ipfire.org Git - thirdparty/git.git/commitdiff
gitk: make "make -s" silent
authorHarald Nordgren <haraldnordgren@gmail.com>
Sun, 21 Jun 2026 14:56:42 +0000 (14:56 +0000)
committerJohannes Sixt <j6t@kdbg.org>
Tue, 23 Jun 2026 16:16:06 +0000 (18:16 +0200)
The catalog rule runs msgfmt with --statistics, whose output goes to
stderr and so survives "make -s", and the rule also echoes "Generating
catalog". The Gitk Makefile guards its quiet helpers on V alone, so a
silent build still prints these and the GEN line.

The statistics are not needed, as in 2f12b31b746c (Makefile: don't
invoke msgfmt with --statistics, 2021-12-17). Drop them, suppress the
quiet helpers when "s" is among the make flags, and give the catalog
rule a quiet prefix so a quiet build stays quiet.

Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Makefile

index 41116d8a146f266ed1e34e859ef38051b8805210..dd87f501e56868b79e9e17eaeceb04ded6b195a1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -43,9 +43,12 @@ PO_TEMPLATE = po/gitk.pot
 ALL_POFILES = $(wildcard po/*.po)
 ALL_MSGFILES = $(subst .po,.msg,$(ALL_POFILES))
 
+ifneq ($(findstring s,$(firstword -$(MAKEFLAGS))),s)
 ifndef V
        QUIET          = @
        QUIET_GEN      = $(QUIET)echo '   ' GEN $@ &&
+       QUIET_MSGFMT   = $(QUIET)echo '   ' MSGFMT $@ &&
+endif
 endif
 
 all:: gitk-wish $(ALL_MSGFILES)
@@ -75,8 +78,7 @@ update-po:: $(PO_TEMPLATE)
        echo; \
        echo "  git config filter.gettext-no-location.clean \"msgcat --no-location -\""
 $(ALL_MSGFILES): %.msg : %.po
-       @echo Generating catalog $@
-       $(MSGFMT) --statistics --tcl -l $(basename $(notdir $<)) -d $(dir $@) $<
+       $(QUIET_MSGFMT)$(MSGFMT) --tcl -l $(basename $(notdir $<)) -d $(dir $@) $<
 
 .PHONY: all install uninstall clean update-po
 .PHONY: FORCE