-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
47 lines (38 loc) · 1022 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
43
44
45
46
47
TEX_DIRECTORIES=$(sort $(dir $(wildcard */*.tex)))
TEXFILES=$(wildcard */*.tex)
PDFTARGETS=$(TEXFILES:.tex=.pdf)
SVGTARGETS=$(PDFTARGETS:.pdf=.svg)
.PHONY: all
all: svgs gif
.PHONY: pdfs
pdfs: $(PDFTARGETS)
.PHONY: svgs
svgs: $(SVGTARGETS)
%.pdf: %.tex
@echo '******** starting latexmk ********'; \
cd $(@D); \
echo $@; \
latexmk -shell-escape -quiet -pdf $(<F); \
echo '******** finished latexmk ********'; \
%.svg: %.pdf
pdf2svg $< $@
svgo -i $@ --precision=6 --multipass --pretty --indent=4 --final-newline
.PHONY: gif
gif: animated/HiSPARC_animated.pdf
convert -alpha remove -density 192 -delay 2 -loop 0 -duplicate 15,-1 animated/HiSPARC_animated.pdf -layers Optimize animated/HiSPARC_animated.gif
.PHONY: distclean
distclean:
for dir in $(TEX_DIRECTORIES); do \
cd $$dir; \
latexmk -quiet -C *.tex; \
cd ..; \
done
rm -f $(SVGTARGETS)
rm -f animated/HiSPARC_animated.gif
.PHONY: clean
clean:
for dir in $(TEX_DIRECTORIES); do \
cd $$dir; \
latexmk -quiet -c *.tex; \
cd ..; \
done