-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (28 loc) · 945 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
AUTHOR='Shikibu, M.'
LASTNAME=Shikibu
OUTPUT_PREFIX=outputs/$(LASTNAME)_CV
COMMON_DEPS = main.qmd sources/cv1.qmd outputs/ref_output_edit.md sources/cv2.qmd
.PHONY: all ref pdf docx md clean
all: pdf docx md
ref: outputs/ref_output_edit.md
pdf: $(OUTPUT_PREFIX).pdf
docx: $(OUTPUT_PREFIX).docx
md: $(OUTPUT_PREFIX).md
outputs/ref_output_edit.md: sources/ref.qmd sources/ref.bib scripts/ref_edit.py
quarto render sources/ref.qmd --to=md
mv sources/ref_output.md outputs/ref_output.md
python scripts/ref_edit.py $(AUTHOR)
$(OUTPUT_PREFIX).pdf: $(COMMON_DEPS)
quarto render main.qmd --to=pdf
mv main.pdf $(OUTPUT_PREFIX).pdf
mv main.tex outputs/$(LASTNAME)_CV.tex
$(OUTPUT_PREFIX).docx: $(COMMON_DEPS)
quarto render main.qmd --to=docx
mv main.docx $(OUTPUT_PREFIX).docx
$(OUTPUT_PREFIX).md: $(COMMON_DEPS)
quarto render main.qmd --to=md
mv main.md $(OUTPUT_PREFIX).md
clean:
rm -f outputs/*.tuc \
outputs/*.log \
cont-en.*