From 2aafceb44c95e25d91d475d342c5ea38e00f11a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr> Date: Thu, 3 Jan 2019 18:51:03 +0100 Subject: [PATCH] Parallelize makefile across langs --- Makefile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0e47af8..914f6a4 100644 --- a/Makefile +++ b/Makefile @@ -35,14 +35,20 @@ update-sources: define MAKE_TARGET +$(1)_$(2): + @echo $lang; cd $(2) && $(MAKE) -f ../makefile.locale $(1) lang=$(2) -$(1): po4a-stamp - $(foreach lang,$(ALL_LANGUAGES),@echo $lang; cd $(lang) && $(MAKE) -f ../makefile.locale $(1) lang=$(lang)) +$(1): $(1)_$(2) + +.PHONY: $(1)_$(2) endef +.PHONY: $(TARGETS) + +man all html : po4a-stamp -$(foreach target, $(TARGETS), $(eval $(call MAKE_TARGET,$(target)))) +$(foreach lang,$(ALL_LANGUAGES),$(foreach target, $(TARGETS), $(eval $(call MAKE_TARGET,$(target),$(lang))))) mrproper: mrproper-local -- GitLab