docs/gimme-shellter

view Makefile @ 10:7adaf386e4ff

added generation of print version to makefile
author meillo@marmaro.de
date Wed, 12 Dec 2007 12:54:45 +0100
parents aa6f8b1bab77
children 71ca21c937d1
line source
1 # Makefile for latex docs
2 # by meillo@marmaro.de
3 #
6 PDFLATEX = pdflatex
8 SRC = GimmeShellter.tex
9 OBJ = GimmeShellter.pdf
10 #OBJ = ${SRC:.tex:.pdf}
12 PRINT = print.tex
13 PRINTPDF = print.pdf
14 PRINTALL = print.*
15 PRINTOBJ = GimmeShellter_print.pdf
18 all: ${OBJ}
21 #.tex.pdf:
22 ${OBJ}: ${SRC}
23 @echo generating $<
24 @${PDFLATEX} $<
27 dist: realclean print
28 # generate 3 times for correct toc and pagenumbers
29 ${MAKE} all
30 sleep 1
31 touch ${SRC}
32 ${MAKE} all
33 sleep 1
34 touch ${SRC}
35 ${MAKE} all
38 clean:
39 @echo 'cleaning ...'
40 @rm -f *.{aux,lof,log,lot,nav,out,snm,toc}
42 rmpdf:
43 @echo 'removing PDFs ...'
44 @rm -f *.pdf
46 realclean: clean rmpdf
48 xpdf: all
49 xpdf -z page ${OBJ} &
51 print:
52 @echo 'creating print version'
53 @sed -e '/\\pause/d' ${SRC} > ${PRINT}
54 @${PDFLATEX} ${PRINT}
55 sleep 1
56 touch ${SRC}
57 @${PDFLATEX} ${PRINT}
58 sleep 1
59 touch ${SRC}
60 @${PDFLATEX} ${PRINT}
61 @${MAKE} clean
62 @mv ${PRINTPDF} ${PRINTOBJ}
64 .PHONY: all xpdf dist clean realclean rmpdf
65 .SUFFIXES: .tex .pdf
68 #merge:
69 # rm -f all.pdf
70 # pdftk A=00_vorstellung.pdf cat A1-2 output 00_vorstellung-mod.pdf && rm 00_vorstellung.pdf
71 # pdftk *.pdf cat output all.pdf
73 #xpdf: ${OBJ}
74 # @echo xpdf $@
75 # @xpdf -fullscreen -z page ${OBJ} &
76 # #@rm ${OBJ}