From a0fb772af4a68db36086e39ad5ab78e4ff765c9e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>
Date: Sat, 5 Jan 2019 13:24:05 +0100
Subject: [PATCH] Add dependency of each language sub-make to po4a

---
 Makefile | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 00d1e74..500c922 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,9 @@ EN_SOURCES = $(wildcard en/*.txt)
 LANGUAGE_PO = $(wildcard po/*.po)
 ALL_LANGUAGES = $(subst po/documentation.,,$(subst .po,,$(LANGUAGE_PO)))
 
-TARGETS = all man html clean install doc-l10n install-l10n mrproper
+L10N_BUILD_TARGETS = all man html install doc-l10n install-l10n
+L10N_CLEAN_TARGETS = clean mrproper
+L10N_TARGETS = $(L10N_CLEAN_TARGETS) $(L10N_BUILD_TARGETS)
 
 ifneq ($(findstring $(MAKEFLAGS),s),s)
 ifndef V
@@ -44,11 +46,17 @@ $(1): $(1)_$(2)
 
 endef
 
-.PHONY: $(TARGETS)
+define DEPEND_PO4A
+ $(1)_$(2): po4a-stamp
+endef
+
+.PHONY: $(L10N_BUILD_TARGETS) $(L10N_CLEAN_TARGETS)
 
 man all html doc-l10n : po4a-stamp
 
-$(foreach lang,$(ALL_LANGUAGES),$(foreach target, $(TARGETS), $(eval $(call MAKE_TARGET,$(target),$(lang)))))
+$(foreach lang,$(ALL_LANGUAGES),$(foreach target,$(L10N_TARGETS),$(eval $(call MAKE_TARGET,$(target),$(lang),DEPEND_PO4A))))
+
+$(foreach lang,$(ALL_LANGUAGES),$(foreach target,$(L10N_BUILD_TARGETS),$(eval $(call DEPEND_PO4A,$(target),$(lang)))))
 
 mrproper: mrproper-local
 
-- 
GitLab