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

[PATCH 1/2] gitk: silence catalog output under "make -s"

From
Harald Nordgren via GitGitGadget <gitgitgadget@gmail.com>
Date
Jun 14, 2026, 17:52 UTC
Message-ID
<18451d46e431dec2ce3275d4837bd595298fc246.1781459539.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.2339.git.git.1781459539.gitgitgadget@gmail.com>
From: Harald Nordgren <haraldnordgren@gmail.com>

The catalog rule unconditionally echoed "Generating catalog" and ran msgfmt with --statistics, whose output went to stderr and so survived "make -s".

Emit the "Generating catalog" line and the msgfmt statistics only when "-s" is absent, leaving a quiet build silent while default and V=1 builds are unchanged.

Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
---
 gitk-git/Makefile | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/gitk-git/Makefile b/gitk-git/Makefile
index 41116d8a14..10078c54d4 100644
--- a/gitk-git/Makefile
+++ b/gitk-git/Makefile
@@ -43,10 +43,16 @@ PO_TEMPLATE = po/gitk.pot
 ALL_POFILES = $(wildcard po/*.po)
 ALL_MSGFILES = $(subst .po,.msg,$(ALL_POFILES))
 
+MSGFMT_GEN = @:
+
+ifneq ($(findstring s,$(firstword -$(MAKEFLAGS))),s)
 ifndef V
 	QUIET          = @
 	QUIET_GEN      = $(QUIET)echo '   ' GEN $@ &&
 endif
+	MSGFMT_GEN   = @echo Generating catalog $@
+	MSGFMT_STATS = --statistics
+endif
 
 all:: gitk-wish $(ALL_MSGFILES)
 
@@ -75,8 +81,8 @@ 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 $@) $<
+	$(MSGFMT_GEN)
+	$(MSGFMT) $(MSGFMT_STATS) --tcl -l $(basename $(notdir $<)) -d $(dir $@) $<
 
 .PHONY: all install uninstall clean update-po
 .PHONY: FORCE
-- 
gitgitgadget
Previous: Harald Nordgren via GitGitGadgetNext: Harald Nordgren via GitGitGadget
Message 2 of 21 in “Silence po catalog output under "make -s"”
  1. 0/2 Silence po catalog output under "make -s"Harald Nordgren via GitGitGadget, Jun 14, 2026
  2. 1/2 gitk: silence catalog output under "make -s"Harald Nordgren via GitGitGadget, Jun 14, 2026
  3. 2/2 git-gui: silence statistics under "make -s"Harald Nordgren via GitGitGadget, Jun 14, 2026
  4. Harald NordgrenJun 15, 2026
  5. Johannes SixtJun 20, 2026
  6. gitk, git-gui: drop msgfmt --statistics outputHarald Nordgren via GitGitGadget, Jun 20, 2026
  7. 2/1 git-gui: reduce complexity of the quiet msgfmt ruleJohannes Sixt, Jun 21, 2026
  8. Johannes SixtJun 21, 2026
  9. Harald NordgrenJun 21, 2026
  10. Johannes SixtJun 21, 2026
  11. Harald NordgrenJun 21, 2026
  12. Johannes SixtJun 21, 2026
  13. 0/2 Silence po catalog output under "make -s"Harald Nordgren via GitGitGadget, Jun 21, 2026
  14. 1/2 gitk: make "make -s" silentHarald Nordgren via GitGitGadget, Jun 21, 2026
  15. 2/2 git-gui: silence statistics under "make -s"Harald Nordgren via GitGitGadget, Jun 21, 2026
  16. Johannes SixtJun 23, 2026
  17. Harald NordgrenJun 26, 2026
  18. Johannes SixtJun 27, 2026
  19. Junio C HamanoJun 28, 2026
  20. Harald NordgrenJul 12, 2026
  21. Junio C HamanoJul 12, 2026

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.