-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (34 loc) · 1.37 KB
/
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
38
39
40
41
42
43
44
45
46
47
THESIS_FILES = abstract.tex acknowledgements.tex intro.tex preliminaries.tex \
stateoftheart.tex realprogs.tex memorymodels.tex termination.tex \
conclusion.tex papers.tex
all : thesis.pdf thesis-print.pdf list-of-publications.pdf cover-page.pdf abstract.pdf abstract-cz.pdf abstract.txt abstract-cz.txt
%.pdf : %.tex defs.tex %.bbl
latexmk -pdf -shell-escape $<
%.pdf : %.md
pandoc -V geometry:a4paper,margin=4.5cm -V pagestyle:empty $< -o $@
abstract.md : abstract.tex
printf "# Analysis of Parallel C++ Programs\n\n## Vladimír Štill\n\n### Abstract\n\n" > $@
sed 's/%.*//' $< >> $@
%.txt : %.md
sed 's/\\ / /g' $< \
| grep -v '^#' \
| perl -E 'my $$e = 1; while (<>) { chomp; next if ($$e && /^$$/); $$e = 0; print; print " "; print "\n\n" if $$_ eq ""; }' \
| sed -e 's/ */ /g' -e 's/ $$//' \
> $@
thesis.pdf : $(THESIS_FILES)
thesis-print.pdf : $(THESIS_FILES)
list-of-publications.pdf : papers.tex
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/' \
$< > $@
%.bbl : %.bcf
biber $(@:.bbl=)
%.bcf : $(wildcard *.bib) $(wildcard *.tex)
pdflatex -shell-escape $(@:%.bcf=%.tex)
clean:
rm -f *.aux *.bbl *.bcf *.blg *.fdb_latexmk *.fls *.log *.out *.run.xml *.toc *.pyg
.PRECIOUS: %.bcf %.bbl
.PHONY: all clean