-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
68 lines (52 loc) · 1.31 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
SHELL := /bin/bash
# This variable should be set only inside the Docker container.
ifndef TEXLIVE_CONTAINER
# We are not in the container. Execute the same command inside the
# container.
USER_ID=$(shell id -u)
GROUP_ID=$(shell id -g)
IMAGE_NAME="vakaras/texlive:2021-06-28"
default: thesis.pdf
.cache:
mkdir -p .cache
shell: | .cache
sudo docker run --rm -ti \
--user="$(USER_ID):$(GROUP_ID)" \
-v "${CURDIR}":/data \
-v "${CURDIR}"/.cache:/home/developer \
$(IMAGE_NAME) \
/bin/bash
%: | .cache
sudo docker run --rm -ti \
--user="$(USER_ID):$(GROUP_ID)" \
-v "${CURDIR}":/data \
-v "${CURDIR}"/.cache:/home/developer \
$(IMAGE_NAME) \
/bin/bash -c "make $@"
else
LATEX = latex
PDFLATEX = xelatex
BIBTEX = bibtex
DVIPS = dvips
DVIPDF = dvipdf
PDFTOEPS = pdftops -eps
PDFTOPS = pdf2ps
EPSTOPDF = epstopdf
FIGTODEV = fig2dev
MPOST = mpost
TEXFILES = $(wildcard *.tex)
.PHONY: default clean
default: thesis.pdf
thesis.pdf: $(TEXFILES)
$(PDFLATEX) -shell-escape thesis.tex
$(BIBTEX) thesis
$(PDFLATEX) -shell-escape thesis.tex
$(PDFLATEX) -shell-escape thesis.tex
%.pdf: %.svg
inkscape --file $< --export-pdf=$@
clean:
rm -rf build/
rm -f *.aux
rm -f thesis.aux thesis.bbl thesis.blg thesis.dvi thesis.log thesis.out thesis.pdf thesis.ps thesis.thm thesis.toc texput.log
rm -rf _minted-thesis/
endif