forked from UniboDIFABiophysics/UniBO_beamer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
55 lines (43 loc) · 1.1 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
53
54
55
ifeq ($(OS), Windows_NT)
remove = del /s
magick = magick.exe convert
sep = \\
else
remove = rm -f
magick = convert
sep = /
endif
file = unibo-example.tex
out = example
tex_dir = tex
svg_img = $(sort $(wildcard img/*.svg))
imgs = $(patsubst img/%.svg, img/%, $(svg_img))
pdf_img = $(patsubst img/%, img/%.pdf, $(imgs))
gif_img = $(sort $(wildcard img/*.gif))
gif_split = $(patsubst img/%.gif, gif/%-0.png, $(gif_img))
all: presentation
convert_img: $(pdf_img)
img/%.pdf: img/%.svg
inkscape -D -z --file=$< --export-pdf=$@ --export-latex
gif/%-0.png: img/%.gif
@mkdir -p gif
$(magick) -coalesce $< gif/$*.png
presentation: $(file) \
$(pdf_img) $(gif_split)
latexmk -synctex=1 -bibtex -interaction=nonstopmode -file-line-error -pdf $(basename $(file)) -jobname=$(out)
$(MAKE) clean
.PHONY: clean
clean:
$(remove) $(out).blg
$(remove) $(out).fls
$(remove) $(out).log
$(remove) $(out).out
$(remove) $(out).snm
$(remove) $(out).synctex.gz
.PHONY: cleanall
cleanall: clean
@$(remove) $(out).aux
@$(remove) $(out).fdb_latexmk
@$(remove) $(out).bbl
@$(remove) $(out).nav
@$(remove) $(out).toc