-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (27 loc) · 867 Bytes
/
Makefile
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
svgfigures = $(wildcard figures/*.svg)
xcffigures = $(wildcard figures/*.xcf)
pdffigures = $(svgfigures:.svg=.pdf)
jpgfigures = $(xcffigures:.xcf=.jpg)
src = $(wildcard *.tex)
all: thesis
thesis: $(src) $(pdffigures) $(jpgfigures)
texfot latexmk -halt-on-error -pdf --shell-escape thesis.tex 2>&1
thesis-print: thesis-print.tex $(src) $(pdffigures) $(jpgfigures)
texfot latexmk -halt-on-error -pdf --shell-escape thesis-print.tex 2>&1
thesis-print.tex: thesis.tex
sed -e 's/linkcolor={.*}/linkcolor={black}/' \
-e 's/citecolor={.*}/citecolor={black}/' \
-e 's/urlcolor={.*}/urlcolor={black}/' \
-e 's/\\iffalse.*%@ifprint/\\iftrue/' \
$< > $@
.PHONY: clean
clean-thesis:
latexmk -c
clean-figures:
rm $(pdffigures)
rm $(jpgfigures)
clean: clean-thesis clean-figures
%.pdf: %.svg
inkscape $< --export-pdf=$@
%.jpg: %.xcf
util/xcfToJpg.sh $< $@