From 816374aec06cd266f01136ccbe8d913d8e67aa62 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 20 Dec 2007 12:15:59 +0100 Subject: initaal commit Signed-off-by: Karel Zak --- Makefile | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Makefile (limited to 'Makefile') 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 -- cgit