docs/Development-Case

view Makefile @ 5:303fa01dce67

added Makefile
author meillo@marmaro.de
date Wed, 16 Jan 2008 11:46:50 +0100
parents
children
line source
1 # generic Makefile for latex docs
2 # by meillo@marmaro.de
3 #
4 # Attention: needs GNUmake for patsubst and wildcard
7 SRC = *.tex
8 OBJ = $(patsubst %.tex, %.pdf, $(wildcard *.tex))
9 PDFLATEX = pdflatex
12 all: ${OBJ}
15 #.tex.pdf:
16 %.pdf: %.tex
17 @echo generating $<
18 #@for i in $< ; do
19 @ ${PDFLATEX} $<
20 # @done
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
32 clean:
33 @echo 'cleaning ...'
34 @rm -f *.{aux,lof,log,lot,nav,out,snm,toc}
36 rmpdf:
37 @echo 'removing PDFs ...'
38 @rm -f *.pdf
40 realclean: clean rmpdf
42 xpdf: all
43 xpdf -z page *.pdf
46 .PHONY: all xpdf dist clean realclean rmpdf
47 .SUFFIXES: .tex .pdf
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
55 #xpdf: ${OBJ}
56 # @echo xpdf $@
57 # @xpdf -fullscreen -z page ${OBJ} &
58 # #@rm ${OBJ}