-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
42 lines (36 loc) · 903 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
#
# Makefile for projects using multibib
#
latex=pdflatex
# Function to grep the multibib citation names out
# of a file and quote them
multibib_names = $(shell \
grep -o '\\bibliography[^{}]*{' $(1) \
| grep -v style \
| sort \
| uniq \
| sed 's/\\bibliography/"/;s/{/"/')
web_repo=/Users/gamblin2/Sites/tgamblin.github.io
# Any PDF is a valid target, but this is the default one.
all: todd-cv.pdf
%.pdf: %.tex preamble.tex Sections/*.tex Bibliographies/*.bib
$(latex) $*
for qname in $(call multibib_names,$<); do \
if [ -z $${qname} ]; then \
bibtex $*; \
else \
bibtex $${qname}; \
fi; \
done; \
$(latex) $*
$(latex) $*
upload:
cp todd-cv.pdf $(web_repo)/cv/todd-cv.pdf
cd $(web_repo) && \
git add cv/todd-cv.pdf && \
git commit -m "CV update" && \
git push -f
clean:
rm -f *.pdf
rm -f *.aux *.bbl *.blg *.log *.out *.top *.tui
rm -f *-mpgraph.mp *synctex.gz*