-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
48 lines (36 loc) · 950 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
38
39
40
41
42
43
44
45
46
47
48
.DEFAULT_GOAL := all
TEX_PATH := tex/cv.tex
TEX_SOURCES := $(shell find $(dir $(TEX_PATH)) -name '*.tex')
OUTPUT_DIR := out
PDF_PATH := $(OUTPUT_DIR)/nicholas-nadeau_cv.pdf
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# phony targets
.PHONY: all
all: git pdf
.PHONY: git
git:
git submodule update --init --recursive
.PHONY: pdf
pdf: $(PDF_PATH)
.PHONY: clean
clean:
rm -rf $(OUTPUT_DIR)
.PHONY: debug
debug:
@echo TEX sources: $(TEX_SOURCES)
.PHONY: docker
docker:
docker run \
-v $$(pwd):/$$(basename $$(pwd)) \
-w /$$(basename $$(pwd)) \
-it \
texlive/texlive \
make
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# file targets
$(PDF_PATH): $(TEX_PATH) $(TEX_SOURCES) awesome-cv.cls
mkdir -p $(OUTPUT_DIR)
xelatex -output-directory=$(OUTPUT_DIR) $<
mv $(OUTPUT_DIR)/$(basename $(notdir $(TEX_PATH))).pdf $(PDF_PATH)
awesome-cv.cls:
cp awesome-cv/awesome-cv.cls .