]> hydra-www.ietfng.org Git - mcv-academic/commitdiff
Updated with dynamic rules
authoradin <adin@ic.unicamp.br>
Thu, 6 Jul 2017 19:31:06 +0000 (16:31 -0300)
committeradin <adin@ic.unicamp.br>
Thu, 6 Jul 2017 19:31:06 +0000 (16:31 -0300)
example/Makefile

index 853ffb5aedf49d1737906f03013a23b5472e088b..f0d92e3a1d3f1e5be1138b509dbe9e6ded6ebcb2 100644 (file)
@@ -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