Rewrite pattern rule with templates

pull/6/head
Daniel Borchmann 5 years ago
parent 51ae3ad864
commit 802e0abbb9
Signed by untrusted user who does not match committer: dbo
GPG Key ID: 4F63DB96D45AA9C6

@ -15,9 +15,14 @@ distclean: clean
presentations/$(BUILD_DIR)/%:
mkdir -p $@
.ONESHELL:
presentations/%.pdf : presentations/%.tex $(BUILD_DECKS)
define PRESENTATION_template
.ONESHELL: $(1)
$(1): $(subst .pdf,.tex,$(1)) $(BUILD_DECKS)
cd presentations
$(LATEX) $(notdir $<)
$(LATEX) $(notdir $<)
mv $(BUILD_DIR)/$*.pdf .
$(LATEX) $$(notdir $$<)
$(LATEX) $$(notdir $$<)
mv $(subst presentations/,$(BUILD_DIR)/,$(1)) .
endef
$(foreach presentation, $(PRESENTATIONS), \
$(eval $(call PRESENTATION_template, $(presentation))))

Loading…
Cancel
Save