From: adin Date: Thu, 6 Jul 2017 19:31:06 +0000 (-0300) Subject: Updated with dynamic rules X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=1862f8f7bc0e45cf8bae0b85cbe74e3a289857c6;p=mcv-academic Updated with dynamic rules --- diff --git a/example/Makefile b/example/Makefile index 853ffb5..f0d92e3 100644 --- a/example/Makefile +++ b/example/Makefile @@ -1,4 +1,7 @@ -# Our languages +# Programs +MAKE = make + +# Our languages, styles, and patterns LANGS = en es pt STYLES = classic oldstyle fancy banking casual academic friggeri PATTERNS := $(foreach style, $(STYLES), $(foreach lang, $(LANGS), $(style)-$(lang))) @@ -9,11 +12,17 @@ SOURCE = $(NAME: %=%.tex) DETAILS = true # Default make to build these rules instead of files in case they exist -.PHONY: all clean veryclean $(PATTERNS) +.PHONY: all clean veryclean $(PATTERNS) $(LANGS) $(STYLES) # Rules all: $(PATTERNS) +$(LANGS): + @$(MAKE) $(foreach style, $(STYLES), $(style)-$@) + +$(STYLE): + @$(MAKE) $(foreach lang, $(LANGS), $@-$(lang)) + # we need to clean before compiling a new language $(PATTERNS): clean # compile the language