-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmakefile
33 lines (25 loc) · 811 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
IMGDIR=images
TIKZDIR=tikz
AUX=$(TIKZDIR)/aux
TIKZ=$(wildcard $(TIKZDIR)/*.tex)
TIKZPNGS=$(TIKZ:%.tex=%.pdf.png)
PNGS=$(TIKZPNGS:$(TIKZDIR)/%=$(IMGDIR)/%)
TIKZIMGS=$(wildcard $(TIKZDIR)/*.pdf.png)
TREESTYLE=$(TIKZDIR)/tree.tikz
RBSTYLE=$(TIKZDIR)/red-black.tikz
RBTREES=$(wildcard $(TIKZDIR)/red-black*.tex)
BINTREES=$(wildcard $(TIKZDIR)/binomial*.tex)
LEFTISTTREES=$(wildcard $(TIKZDIR)/leftist-tree*.tex)
all: $(PNGS)
$(BINTREES): $(TREESTYLE)
@touch $@
$(LEFTISTTREES): $(TREESTYLE)
@touch $@
$(RBTREES): $(RBSTYLE) $(TREESTYLE)
@touch $@
$(IMGDIR)/%.pdf.png: $(TIKZDIR)/%.tex
@cd $(TIKZDIR) && latexmk $(^F) && cd .. && convert -density 600x600 $(AUX)/$(^F:%.tex=%.pdf) -quality 90 -resize 1080x800 $@
clean:
rm -r $(AUX)
rebuild:
@cp -r _site/.git tmp && ./site rebuild && mv tmp _site/.git