-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
27 lines (18 loc) · 887 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
SHELL = /bin/bash -euo pipefail
CV_NAME = cv
COVER_NAME = cover
LATEXMK = latexmk
DOCKER_IMAGE = blang/latex:ubuntu
.PHONY: all cv cover clean deepclean docker-%
all: cv cover
cv:
$(LATEXMK) -dvi- -pdf -file-line-error -interaction=nonstopmode $(CV_NAME).tex
cover:
$(LATEXMK) -dvi- -pdf -file-line-error -interaction=nonstopmode $(COVER_NAME).tex
clean:
find . -name "*.log" -o -name "*.aux" -o -name "*.dvi" -o -name "*.bbl" -o -name "*.blg" -o -name "*.out" -o -name "*.toc" -o -name "*.lof" -o -name "*.brf" -o -name "*.lot" -o -name "*.ent" -o -name "*.fls" -o -name "*.fdb_latexmk" -o -name "*.synctex.gz" -o -name "*.*~" | xargs rm -rf
deepclean: clean
rm -f {$(CV_NAME),$(COVER_NAME)}.pdf
# Execute any target inside a Docker container
docker-%:
docker run --rm -i --user $(shell id -u):$(shell id -g) --network none -v "$(PWD)":/data $(DOCKER_IMAGE) make $*