From f9d95f812b53fcb365522babe39d518b01a7b624 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sat, 21 Apr 2018 14:20:40 +0200 Subject: wip --- Makefile | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 2f8da55..5761bbb 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ P=what-is-iot # Madrid Pittsburgh boxes -SLIDE_THEME=boxes +SLIDE_THEME?=boxes PDFS=$(P)-text.pdf $(P)-slides.pdf HTMLS=$(P)-reveal.html @@ -49,10 +49,10 @@ $(P).md: Makefile %-text.pdf: %.beamer.md $(RUN_PANDOC_TEXT) -o $@ $< -%-slides.pdf: %.beamer.md +%-slides.pdf: %.beamer.md .var/SLIDE_THEME $(RUN_PANDOC_BEAMER) -o $@ $< -%-slides.tex: %.beamer.md +%-slides.tex: %.beamer.md .var/SLIDE_THEME $(RUN_PANDOC_BEAMER) -o $@ $< %.revealjs.md: %.md @@ -66,6 +66,17 @@ images/%.pdf: images/%.tex | images/pp-template Makefile xelatex -output-directory=images $(patsubst %.tex,%-full.tex,$<) mv $(patsubst %.pdf,%-full.pdf,$@) $@ + +VARS=SLIDE_THEME + +define refresh = +.var/$(1):: + @mkdir -p .var + @./refresh $$@ $(1) $($(1)) +endef + +$(foreach var,$(VARS),$(eval $(call refresh,$(var)))) + # Dependencies $(P).md: images/IP-Header_eng.tex $(P).md: images/ip-header.pdf -- cgit v1.2.3