-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (20 loc) · 743 Bytes
/
Makefile
File metadata and controls
29 lines (20 loc) · 743 Bytes
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
.PHONY: gen clean all builddir slides handout
TMP := gen
SVGS := $(shell find diagrams/* -maxdepth 0 -name '*.svg')
PNGS = $(patsubst %.svg,$(TMP)/%.pdf,$(SVGS))
all: slides handout
test -d ~/public_html && cp -f gitworkshop.pdf gitworkshop\ Handout.pdf ~/public_html/ || true
slides: gen $(PNGS)
cd $(TMP) && pdflatex ../gitworkshop.tex
cd $(TMP) && pdflatex ../gitworkshop.tex
mv $(TMP)/gitworkshop.pdf .
handout: gen $(PNGS)
cd $(TMP) && HANDOUT=1 pdflatex ../gitworkshop.tex
cd $(TMP) && HANDOUT=1 pdflatex ../gitworkshop.tex
mv $(TMP)/gitworkshop.pdf gitworkshop\ Handout.pdf
gen:
mkdir -p $(TMP)/diagrams
$(TMP)/%.pdf: %.svg
inkscape $< --export-area-drawing --export-dpi=600 --export-filename $@
clean:
rm -rf $(TMP)