-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·36 lines (27 loc) · 941 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
SRC = $(wildcard *.md)
PDFS=$(SRC:.md=.pdf)
HTML=$(SRC:.md=.html)
LATEX_TEMPLATE=./pandoc-templates/default.latex
all: clean docker_setup $(PDFS) $(HTML)
docker_setup:
docker build --tag pandoc/latex-resume:1.0 .
mkdir -p .tmp
pdf: clean $(PDFS)
html: clean $(HTML)
%.html: %.md
python resume.py html $(GRAVATAR_OPTION) < $< > .tmp/resume.html.md
docker run --rm --volume "`pwd`:/data" --user `id -u`:`id -g` pandoc/latex-resume:1.0 .tmp/resume.html.md -t html -c resume.css -o $@
%.pdf: %.md $(LATEX_TEMPLATE)
python resume.py tex < $< > .tmp/resume.tex.md
docker run --rm --volume "`pwd`:/data" --user `id -u`:`id -g` pandoc/latex-resume:1.0 .tmp/resume.tex.md $(PANDOCARGS) --variable subparagraph --template=$(LATEX_TEMPLATE) -H header.tex -o $@
ifeq ($(OS),Windows_NT)
# on Windows
RM = cmd //C del
else
# on Unix
RM = rm -f
endif
clean:
$(RM) *.html *.pdf
$(LATEX_TEMPLATE):
git submodule update --init