summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..fb3ba84
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,27 @@
+SOURCE=erlang.mdwn
+PDF=$(SOURCE:mdwn=pdf)
+REVEALJS=$(SOURCE:mdwn=html)
+REVEALJS_VERSION=3.3.0
+
+IMAGES=$(wildcard *.png)
+ERL_FILES=$(wildcard *.erl)
+BEAM_FILES=$(ERL_FILES:erl=beam)
+
+all: ${REVEALJS} ${PDF} ${BEAM_FILES}
+
+${REVEALJS}: $(SOURCE) $(IMAGES) Makefile reveal.js
+ pandoc -V transition=fade -t revealjs -s ${SOURCE} -o ${REVEALJS}
+
+${PDF}: $(SOURCE) Makefile
+ pandoc -t beamer -s ${SOURCE} -o ${PDF}
+
+%.beam : %.erl
+ erlc $<
+
+reveal.js:
+ git submodule add https://github.com/hakimel/reveal.js.git $@
+ cd $@ && git checkout ${REVEALJS_VERSION}
+ git commit -m"Add reveal.js ${REVEALJS_VERSION}" reveal.js
+
+clean:
+ rm -f *.pdf *.html *.beam