Mercurial > docs > suckless
comparison Makefile @ 0:79424d211485
initial commit (based on GimmeShellter)
author | meillo@marmaro.de |
---|---|
date | Mon, 11 Aug 2008 21:42:23 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:79424d211485 |
---|---|
1 # Makefile for latex docs | |
2 # by meillo@marmaro.de | |
3 # | |
4 | |
5 | |
6 PDFLATEX = pdflatex | |
7 | |
8 SRC = suckless.tex | |
9 OBJ = suckless.pdf | |
10 #OBJ = ${SRC:.tex:.pdf} | |
11 | |
12 PRINT = print.tex | |
13 PRINTPDF = print.pdf | |
14 PRINTALL = print.* | |
15 PRINTOBJ = suckless_print.pdf | |
16 | |
17 | |
18 all: ${OBJ} | |
19 | |
20 | |
21 #.tex.pdf: | |
22 ${OBJ}: ${SRC} | |
23 @echo generating $< | |
24 @${PDFLATEX} $< | |
25 | |
26 | |
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 | |
36 | |
37 | |
38 clean: | |
39 @echo 'cleaning ...' | |
40 @rm -f *.{aux,lof,log,lot,nav,out,snm,toc} | |
41 | |
42 rmpdf: | |
43 @echo 'removing PDFs ...' | |
44 @rm -f *.pdf | |
45 | |
46 realclean: clean rmpdf | |
47 | |
48 xpdf: all | |
49 xpdf -z page ${OBJ} & | |
50 | |
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} | |
64 | |
65 .PHONY: all xpdf dist clean realclean rmpdf | |
66 .SUFFIXES: .tex .pdf |