docs/suckless

view Makefile @ 4:361d00d5b17b

few small fixes
author meillo@marmaro.de
date Wed, 13 Aug 2008 21:43:48 +0200
parents
children
line source
1 # Makefile for latex docs
2 # by meillo@marmaro.de
3 #
6 PDFLATEX = pdflatex
8 SRC = suckless.tex
9 OBJ = suckless.pdf
10 #OBJ = ${SRC:.tex:.pdf}
12 PRINT = print.tex
13 PRINTPDF = print.pdf
14 PRINTALL = print.*
15 PRINTOBJ = suckless_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 @rm -r ${PRINT}
63 @mv ${PRINTPDF} ${PRINTOBJ}
65 .PHONY: all xpdf dist clean realclean rmpdf
66 .SUFFIXES: .tex .pdf