Mercurial > docs > Development-Case
comparison Makefile @ 5:303fa01dce67
added Makefile
author | meillo@marmaro.de |
---|---|
date | Wed, 16 Jan 2008 11:46:50 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
4:a967aa02ee99 | 5:303fa01dce67 |
---|---|
1 # generic Makefile for latex docs | |
2 # by meillo@marmaro.de | |
3 # | |
4 # Attention: needs GNUmake for patsubst and wildcard | |
5 | |
6 | |
7 SRC = *.tex | |
8 OBJ = $(patsubst %.tex, %.pdf, $(wildcard *.tex)) | |
9 PDFLATEX = pdflatex | |
10 | |
11 | |
12 all: ${OBJ} | |
13 | |
14 | |
15 #.tex.pdf: | |
16 %.pdf: %.tex | |
17 @echo generating $< | |
18 #@for i in $< ; do | |
19 @ ${PDFLATEX} $< | |
20 # @done | |
21 | |
22 | |
23 dist: realclean | |
24 # generate 3 times for correct toc and pagenumbers | |
25 ${MAKE} all | |
26 ${MAKE} rmpdf | |
27 ${MAKE} all | |
28 ${MAKE} rmpdf | |
29 ${MAKE} all | |
30 | |
31 | |
32 clean: | |
33 @echo 'cleaning ...' | |
34 @rm -f *.{aux,lof,log,lot,nav,out,snm,toc} | |
35 | |
36 rmpdf: | |
37 @echo 'removing PDFs ...' | |
38 @rm -f *.pdf | |
39 | |
40 realclean: clean rmpdf | |
41 | |
42 xpdf: all | |
43 xpdf -z page *.pdf | |
44 | |
45 | |
46 .PHONY: all xpdf dist clean realclean rmpdf | |
47 .SUFFIXES: .tex .pdf | |
48 | |
49 | |
50 #merge: | |
51 # rm -f all.pdf | |
52 # pdftk A=00_vorstellung.pdf cat A1-2 output 00_vorstellung-mod.pdf && rm 00_vorstellung.pdf | |
53 # pdftk *.pdf cat output all.pdf | |
54 | |
55 #xpdf: ${OBJ} | |
56 # @echo xpdf $@ | |
57 # @xpdf -fullscreen -z page ${OBJ} & | |
58 # #@rm ${OBJ} |