-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (27 loc) · 1.16 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
CHAPTER_DIR = chapters
CHAPTER_TEX := $(wildcard $(CHAPTER_DIR)/*.tex)
SVG_DIR = figures
SVG_FILES := $(wildcard $(SVG_DIR)/*.svg)
SVG_RENDER_DIR = svg-inkscape
SVG_PDF := $(wildcard $(SVG_RENDER_DIR)/*.pdf)
SVG_TEX := $(wildcard $(SVG_RENDER_DIR)/*.pdf_tex)
IMG_PNG := $(wildcard img/*.png)
BIB_FILE = bibliography.bib
CLASS_FILE = baseline.cls
PLANTUML_DIR = diagrams
PLANTUML_URL = https://sourceforge.net/projects/plantuml/files/plantuml.jar/download
PLANTUML_SRC := $(wildcard $(PLANTUML_DIR)/*.plantuml)
PLANTUML_SVG := $(addprefix $(SVG_DIR)/, $(addsuffix .svg, $(notdir $(basename $(PLANTUML_SRC)))))
all : article.pdf slides.pdf
article.pdf: article.tex $(CHAPTER_TEX) $(SVG_FILES) $(IMG_PNG) $(BIB_FILE) $(CLASS_FILE) $(PLANTUML_SVG)
latexmk -pdflatex -shell-escape article.tex
slides.pdf: slides.tex $(SVG_FILES) $(IMG_PNG) $(CLASS_FILE) $(PLANTUML_SVG)
latexmk -pdflatex -shell-escape slides.tex
$(PLANTUML_SVG): $(SVG_DIR)/%.svg : $(PLANTUML_DIR)/%.plantuml plantuml.jar
java -jar plantuml.jar -o ../$(SVG_DIR)/ -tsvg $<
plantuml.jar:
curl -sSfL $(PLANTUML_URL) -o plantuml.jar
clean:
rm -f $(PLANTUML_SVG) $(SVG_PDF) $(SVG_TEX)
latexmk -C
.PHONY: clean all