[PATCH 1 of 4] i18n: avoid substitution of PYFILES at runtime for readability of output

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Thu Aug 2 17:21:49 UTC 2018


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1533211650 -32400
#      Thu Aug 02 21:07:30 2018 +0900
# Node ID 984894e4ad78ef5799a6974d079d45bcf5a64f05
# Parent  2002c193f2bcb07ea898d6229835e7d61bc48aae
# Available At https://bitbucket.org/foozy/mercurial-wip
#              hg pull https://bitbucket.org/foozy/mercurial-wip -r 984894e4ad78
# EXP-Topic refactor-update-pot
i18n: avoid substitution of PYFILES at runtime for readability of output

This substitution decreases readability of "make update-pot" output,
because PYFILES consists of many files.

This patch makes "make update-pot" show "find mercurial hgext doc
-name '*.py'" instead of many *.py files at runtime.

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,8 @@ PYTHON=python
 $(eval HGROOT := $(shell pwd))
 HGPYTHONS ?= $(HGROOT)/build/pythons
 PURE=
-PYFILES:=$(shell find mercurial hgext doc -name '*.py')
+PYFILESCMD=find mercurial hgext doc -name '*.py'
+PYFILES:=$(shell $(PYFILESCMD))
 DOCFILES=mercurial/help/*.txt
 export LANGUAGE=C
 export LC_ALL=C
@@ -145,7 +146,7 @@ i18n/hg.pot: $(PYFILES) $(DOCFILES) i18n
         # parse them even though they are not marked for translation.
         # Extracting with an explicit encoding of ISO-8859-1 will make
         # xgettext "parse" and ignore them.
-	echo $(PYFILES) | xargs \
+	$(PYFILESCMD) | xargs \
 	  xgettext --package-name "Mercurial" \
 	  --msgid-bugs-address "<mercurial-devel at mercurial-scm.org>" \
 	  --copyright-holder "Matt Mackall <mpm at selenic.com> and others" \


More information about the Mercurial-devel mailing list