-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
52 lines (33 loc) · 1.31 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
FILES = zimolzak-cv.pdf zimolzak-cv.docx zimolzak-cv.tex README.md pandocme.tex zimolzak-cv-public.pdf
.PHONY: dropbox clean all
all: $(FILES)
zimolzak-cv.tex: zimolzak-cv-pre.tex preprocess.py secrets.py
python preprocess.py > $@ # Will contain real addresses, phones.
zimolzak-cv.docx: zimolzak-cv.tex
pandoc -o $@ $<
zimolzak-cv.pdf : zimolzak-cv.tex cv.sty
xelatex $<
xelatex $<
cp $@ ~/Dropbox
zimolzak-cv-public.pdf: zimolzak-cv-pre.tex preprocess.py secrets.py cv.sty
python preprocess.py --censor > deleteme.tex
xelatex deleteme.tex
xelatex deleteme.tex
mv deleteme.pdf $@
rm -f deleteme*
# The PDF target above will run ONLY if the LaTeX file is changed
# after the PDF. If it depended on target 'dropbox' it would always
# LaTeX the doc, which is unnecessary.
dropbox :
cp zimolzak-cv.pdf ~/Dropbox
# The phony target above exists so you can force the copy without
# re-LaTeXing and affecting date.
####### New stuff for pandoc -> perl -> README.md
pandocme.tex: zimolzak-cv-pre.tex
perl -pe 's/\\linebreak\[0\]//g' $< > $@
# Have to remove \linebreak commands BEFORE pandoc receives the .tex
README.md: pandocme.tex postprocess.pl
pandoc -o $@ $< # This 1st README will have sections I don't want.
perl -i postprocess.pl $@ # Cut out sections (edit in place).
clean:
rm -f $(FILES) *.aux *.log