Removed trick with pattern-specific variables because build fail in some situations.
--- a/Makefile Wed Apr 19 20:25:10 2017 +0300
+++ b/Makefile Wed Apr 19 20:53:05 2017 +0300
@@ -507,9 +507,8 @@
@echo ===== TSL =====
python3 -B py/gadict_freq.py -b:dist/wordlist/gadict.list +b:wordlist/tsl.var
-.PHONY: missing-stat
-missing-stat: dist/wordlist/gadict.list $(FREQ_DEP) $(BUILD_SCRIPTS)
- @ { \
+define stat-cmd
+{ \
stat() { \
lack=`python3 -B py/gadict_freq.py -b:dist/wordlist/gadict.list $$2:$$3 | wc -l`; \
total=`grep -v '^[ ]' $$3 | wc -l`; \
@@ -527,7 +526,12 @@
stat BSL +b wordlist/bsl.var; \
stat TSL +b wordlist/tsl.var; \
echo " ==== ===== ===== ===="; \
-} $(REDIR)
+}
+endef
+
+.PHONY: missing-stat
+missing-stat: dist/wordlist/gadict.list $(FREQ_DEP) $(BUILD_SCRIPTS)
+ @${stat-cmd}
dist/wordlist/%.list: %.gadict py/gadict_headwords.py $(BUILD_SCRIPTS) | dist/wordlist/
python3 -B py/gadict_headwords.py $< $@
@@ -707,8 +711,9 @@
cat $(STAT_MISSING_FILE); \
} >$@
-$(STAT_MISSING_FILE): REDIR := >$(STAT_MISSING_FILE)
-$(STAT_MISSING_FILE): missing-stat | $(dir $(STAT_MISSING_FILE))
+$(STAT_MISSING_FILE): $(BUILD_SCRIPTS) | $(dir $(STAT_MISSING_FILE))
+ @echo '*' make stat
+ @${stat-cmd} >$(STAT_MISSING_FILE)
dist/misc/:
mkdir -p $@