-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (30 loc) · 951 Bytes
/
Makefile
File metadata and controls
40 lines (30 loc) · 951 Bytes
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
TEX=resume.tex
PDF=$(TEX:.tex=.pdf)
PNG=$(PDF:.pdf=.png)
LOG=build.log
.SUFFIXES: .png .pdf .tex
all: $(PDF) $(PNG)
.tex.pdf:
@echo "- Converting $< to $@"
@xelatex $< >>$(LOG) 2>&1
.pdf.png:
@echo "- Converting $< to $@"
@pdftocairo -png $< >>$(LOG) 2>&1
update: docker_xelatex git_commit_updates
git_add_updates:
@echo "- Adding $(PDF) $(basename $(PNG))-*.png to the git index"
@git add $(PDF) $(basename $(PNG))-*.png
git_commit_updates: git_add_updates
@echo "- Committing files to the git repository"
@git commit -m 'Update current version PNG images and PDF'
docker_build:
@echo "- Building resume docker container image..."
@docker build -t resume . >>$(LOG) 2>&1
@echo "Done."
docker_xelatex: docker_build
@echo "- Running LaTeX docker container to convert to PDF..."
@docker run -v "$$PWD:/src:Z" resume
@echo "Done."
clean:
find . -type f -name "resume*.*" ! -name "resume.tex" -exec rm -vf '{}' \+
git clean -ffdx