summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2007-12-20 12:15:59 +0100
committerKarel Zak <kzak@redhat.com>2007-12-20 12:15:59 +0100
commit816374aec06cd266f01136ccbe8d913d8e67aa62 (patch)
tree40b19d2a9ff853ba2c9d0ffc5aad8e425bb8155f /Makefile
downloadgit-presentation-816374aec06cd266f01136ccbe8d913d8e67aa62.tar.gz
git-presentation-816374aec06cd266f01136ccbe8d913d8e67aa62.tar.xz
git-presentation-816374aec06cd266f01136ccbe8d913d8e67aa62.zip
initaal commit
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile63
1 files changed, 63 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..c7d9909
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,63 @@
+SHOW=yes
+PDFVIEWER=evince
+LATEX=pdflatex
+
+# targets
+all: git.pp.pdf
+
+.PHONY: all clean handout notes
+
+# Don't touch this, HAHA.
+clean: TEXS=$(patsubst %.tex,%,\
+ $(filter-out %.pp.tex %.handout.tex %.notes.tex %.text.tex,\
+ $(wildcard *.tex)))
+clean: PRESENTATION_TMPS=$(wildcard \
+ $(addsuffix .pp.tex,$(TEXS)) \
+ $(addsuffix .handout.tex,$(TEXS)) \
+ $(addsuffix .notes.tex,$(TEXS)) \
+ $(addsuffix .text.tex,$(TEXS)))
+clean: TEX_TMPS=$(filter-out %.tex %.png %.orig %.zal, \
+ $(wildcard $(addsuffix .*,$(TEXS))))
+clean:
+ $(RM) $(wildcard $(PRESENTATION_TMPS) $(TEX_TMPS)) *~
+
+%.pdf: %.tex
+ $(LATEX) $<
+ $(LATEX) $<
+ if [ "$(SHOW)" == "yes" ]; then $(PDFVIEWER) $@; fi
+
+%.png: %.pdf
+ pstoimg -depth 8 -density 120 -antialias -aaliastext -multipage -out $@ $<
+ touch $@
+
+%.eps: %.svg
+ inkscape -z -f $< -D --export-area-snap -E $@
+
+%.pdf: %.eps
+ epstopdf --outfile=$@ $<
+
+
+# presentation/article texs/pdfs
+%.text.tex: %.tex
+ echo '\def\RHpresentationHead#1{}\def\RHarticleHead#1{#1}' >$@
+ echo '\input $<' >>$@
+
+%.pp.tex: %.tex
+ echo '\def\RHpresentationHead#1{#1}\def\RHarticleHead#1{}' >$@
+ echo '\input $<' >>$@
+
+%.handout.tex: %.tex
+ echo '\def\RHpresentationHead#1{#1}\def\RHarticleHead#1{}' >$@
+ echo '\PassOptionsToClass{handout}{beamer}' >>$@
+ echo '\input $<' >>$@
+
+%.notes.tex: %.tex
+ echo '\def\RHpresentationHead#1{#1\setbeameroption{show only notes}}' >$@
+ echo '\def\RHarticleHead#1{}' >>$@
+ echo '\PassOptionsToClass{handout}{beamer}' >>$@
+ echo '\input $<' >>$@
+
+%.text.pdf: %.text.tex %.tex
+%.pp.pdf: %.pp.tex %.tex
+%.handout.pdf: %.handout.tex %.tex
+%.notes.pdf: %.notes.tex %.tex