summaryrefslogtreecommitdiff
path: root/doc/Makefile
blob: 8fb882d57e7092b60afb4417db283268abc09baa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
SRC_DIA=$(wildcard image/*.dia)
SRC_SVG=$(SRC_DIA:.dia=.svg)
SRC_PDF=$(SRC_SVG:.svg=.pdf)
CD_DIR="cdrom"
PIC_DIR="$(CD_DIR)/Bilder"
SRC_DIR="$(CD_DIR)/Quelltext"
DOC_DIR="$(CD_DIR)/Dokumentquellen"

document.pdf: document.tex $(SRC_PDF)
	@pdflatex document.tex
	@makeindex document.nlo -s nomencl.ist -o document.nls
	@bibtex document
	@pdflatex document.tex
	@pdflatex document.tex

all: document.pdf presentation-genua.pdf presentation-hs.pdf cdrom

cdrom: cdrom.img

clean:
	@rm -f $(SRC_SVG) $(SRC_PDF)
	rm -f *.{aux,dvi,log,pdf,toc,nav,out,snm,lot,bbl,lof,blg,glo,ilg,ind,ist,lol,nlo,nls}
	@rm -rf $(CD_DIR)
	@rm -f cdrom.img

presentation-genua.pdf: presentation-genua.tex $(SRC_PDF)
	@pdflatex presentation-genua.tex

presentation-hs.pdf: presentation-hs.tex $(SRC_PDF)
	@pdflatex presentation-hs.tex

presentation-nsmlab.pdf: presentation-nsmlab.tex $(SRC_PDF)
	@pdflatex presentation-nsmlab.tex

image/%.svg: image/%.dia
	@dia --export=$@ -t svg $<

image/%.pdf: image/%.svg
	@inkscape -z -f $<	\
		--export-pdf=$@	\
		--export-area-drawing

cdrom.img: document.pdf presentation-genua.pdf presentation-hs.pdf	\
		$(SRC_PDF) $(SRC_SVG)
	@mkdir -p $(CD_DIR)
	@mkdir -p $(PIC_DIR) $(SRC_DIR) $(DOC_DIR)
	@cp document.pdf $(CD_DIR)/Praxisarbeit.pdf
	@cp $(SRC_DIA) $(SRC_PDF) $(SRC_SVG) $(PIC_DIR)
	@cp code/* $(SRC_DIR)
	@cp -R *.tex *.bib Makefile image $(DOC_DIR)
	@make -C $(DOC_DIR) clean
	@mkisofs -J -o cdrom.img $(CD_DIR)

.PHONY: all clean cdrom