aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2018-04-21 14:20:40 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2018-04-21 14:20:40 +0200
commitf9d95f812b53fcb365522babe39d518b01a7b624 (patch)
tree4ce70660cfa8f146e11dfd153d83ec9a22dc01e0 /Makefile
parenta1035c3f39c0952e09571be076bf6a4cb2fb966c (diff)
downloadiot-workshop-ndc-2018-f9d95f812b53fcb365522babe39d518b01a7b624.tar.gz
iot-workshop-ndc-2018-f9d95f812b53fcb365522babe39d518b01a7b624.tar.bz2
iot-workshop-ndc-2018-f9d95f812b53fcb365522babe39d518b01a7b624.tar.xz
iot-workshop-ndc-2018-f9d95f812b53fcb365522babe39d518b01a7b624.zip
wip
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 14 insertions, 3 deletions
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