-
Notifications
You must be signed in to change notification settings - Fork 2
/
makefile
59 lines (48 loc) · 1.24 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
# Makefile for Adam Altmejd's resume
# Apart from latex, gawk and pandoc, needs the following fonts:
# Fontawesome
# XITS Math: https://github.com/khaledhosny/xits
# Operator Mono
# Gill Sans Std
# Minion Pro
## Source and output files
# Because we have citations we need pandoc to build html file (rather than Jekyll)
sources := cv.md cv_onepage.md
targets := cv.pdf cv_onepage.pdf cv.html
# Settings
CSL = cv.csl
BIB = publications.bib
all: $(targets)
%.html: %.md
pandoc \
--from markdown+smart+yaml_metadata_block+header_attributes+definition_lists \
--citeproc \
--bibliography=$(BIB) \
--csl=$(CSL) \
--to html5 \
--section-divs \
--output $@ $<
%.tex: %.md
sh ./vc -m
pandoc \
--from markdown+smart+yaml_metadata_block+header_attributes+definition_lists \
--to latex \
--pdf-engine=xelatex \
--citeproc \
--bibliography=$(BIB) \
--csl=$(CSL) \
--template=cv.template \
--variable=vc-git \
--standalone \
--output $@ $<
%.pdf: %.tex
latexmk -xelatex $<
rm -f *.tex *.aux *.log *.fls *.out *.fdb_latexmk *.xdv
.PHONY: git clean
git:
git add $(sources) $(targets)
git commit --allow-empty -m "CV makefile auto commit."
git push
clean:
rm -f $(targets)
rm -f *.tex *.aux *.log *.fls *.out *.fdb_latexmk *.xdv