docs/gimme-shellter

annotate 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
rev   line source
meillo@1 1 # Makefile for latex docs
meillo@1 2 # by meillo@marmaro.de
meillo@1 3 #
meillo@1 4
meillo@1 5
meillo@10 6 PDFLATEX = pdflatex
meillo@10 7
meillo@1 8 SRC = GimmeShellter.tex
meillo@10 9 OBJ = GimmeShellter.pdf
meillo@1 10 #OBJ = ${SRC:.tex:.pdf}
meillo@10 11
meillo@10 12 PRINT = print.tex
meillo@10 13 PRINTPDF = print.pdf
meillo@10 14 PRINTALL = print.*
meillo@10 15 PRINTOBJ = GimmeShellter_print.pdf
meillo@1 16
meillo@1 17
meillo@1 18 all: ${OBJ}
meillo@1 19
meillo@1 20
meillo@1 21 #.tex.pdf:
meillo@1 22 ${OBJ}: ${SRC}
meillo@1 23 @echo generating $<
meillo@1 24 @${PDFLATEX} $<
meillo@1 25
meillo@1 26
meillo@10 27 dist: realclean print
meillo@1 28 # generate 3 times for correct toc and pagenumbers
meillo@1 29 ${MAKE} all
meillo@10 30 sleep 1
meillo@10 31 touch ${SRC}
meillo@1 32 ${MAKE} all
meillo@10 33 sleep 1
meillo@10 34 touch ${SRC}
meillo@1 35 ${MAKE} all
meillo@1 36
meillo@1 37
meillo@1 38 clean:
meillo@1 39 @echo 'cleaning ...'
meillo@1 40 @rm -f *.{aux,lof,log,lot,nav,out,snm,toc}
meillo@1 41
meillo@1 42 rmpdf:
meillo@1 43 @echo 'removing PDFs ...'
meillo@1 44 @rm -f *.pdf
meillo@1 45
meillo@1 46 realclean: clean rmpdf
meillo@1 47
meillo@1 48 xpdf: all
meillo@1 49 xpdf -z page ${OBJ} &
meillo@1 50
meillo@10 51 print:
meillo@10 52 @echo 'creating print version'
meillo@10 53 @sed -e '/\\pause/d' ${SRC} > ${PRINT}
meillo@10 54 @${PDFLATEX} ${PRINT}
meillo@10 55 sleep 1
meillo@10 56 touch ${SRC}
meillo@10 57 @${PDFLATEX} ${PRINT}
meillo@10 58 sleep 1
meillo@10 59 touch ${SRC}
meillo@10 60 @${PDFLATEX} ${PRINT}
meillo@10 61 @${MAKE} clean
meillo@10 62 @mv ${PRINTPDF} ${PRINTOBJ}
meillo@1 63
meillo@1 64 .PHONY: all xpdf dist clean realclean rmpdf
meillo@1 65 .SUFFIXES: .tex .pdf
meillo@1 66
meillo@1 67
meillo@1 68 #merge:
meillo@1 69 # rm -f all.pdf
meillo@1 70 # pdftk A=00_vorstellung.pdf cat A1-2 output 00_vorstellung-mod.pdf && rm 00_vorstellung.pdf
meillo@1 71 # pdftk *.pdf cat output all.pdf
meillo@1 72
meillo@1 73 #xpdf: ${OBJ}
meillo@1 74 # @echo xpdf $@
meillo@1 75 # @xpdf -fullscreen -z page ${OBJ} &
meillo@1 76 # #@rm ${OBJ}