mirror of https://github.com/c3d2/slidenado/
Rewrite pattern rule with templates
This commit is contained in:
parent
51ae3ad864
commit
802e0abbb9
15
Makefile
15
Makefile
|
@ -15,9 +15,14 @@ distclean: clean
|
||||||
presentations/$(BUILD_DIR)/%:
|
presentations/$(BUILD_DIR)/%:
|
||||||
mkdir -p $@
|
mkdir -p $@
|
||||||
|
|
||||||
.ONESHELL:
|
define PRESENTATION_template
|
||||||
presentations/%.pdf : presentations/%.tex $(BUILD_DECKS)
|
.ONESHELL: $(1)
|
||||||
|
$(1): $(subst .pdf,.tex,$(1)) $(BUILD_DECKS)
|
||||||
cd presentations
|
cd presentations
|
||||||
$(LATEX) $(notdir $<)
|
$(LATEX) $$(notdir $$<)
|
||||||
$(LATEX) $(notdir $<)
|
$(LATEX) $$(notdir $$<)
|
||||||
mv $(BUILD_DIR)/$*.pdf .
|
mv $(subst presentations/,$(BUILD_DIR)/,$(1)) .
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(foreach presentation, $(PRESENTATIONS), \
|
||||||
|
$(eval $(call PRESENTATION_template, $(presentation))))
|
||||||
|
|
Loading…
Reference in New Issue