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)/%:
|
||||
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…
Reference in New Issue