forked from MarkLodato/visual-git-guide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (49 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
56
57
58
59
PDFLATEX = pdflatex -halt-on-error -file-line-error
PDF2SVG = pdf2svg
PDF2PNG = convert -density 88
FILES := \
basic-usage \
basic-usage-2 \
checkout-after-detached \
checkout-b-detached \
checkout-branch \
checkout-detached \
checkout-files \
cherry-pick \
commit-amend \
commit-detached \
commit-maint \
commit-master \
conventions \
diff \
merge \
merge-ff \
rebase \
rebase-onto \
reset \
reset-commit \
reset-files
HTML := \
index-en.html \
index-ja.html \
index-ko.html
PDF_OUT = $(FILES:=.pdf)
PNG_OUT = $(PDF_OUT:.pdf=.svg.png)
SVG_OUT = $(PDF_OUT:.pdf=.svg)
CRUFT = $(FILES:=.aux) $(FILES:=.log)
EXTRA := index.html visual-git-guide.css visual-git-guide.js
all : pdf png svg
pdf : $(PDF_OUT)
png : $(PNG_OUT)
svg : $(SVG_OUT)
gh-pages : all
./publish $(PDF_OUT) $(PNG_OUT) $(SVG_OUT) $(HTML) $(EXTRA)
%.pdf : %.tex common.tex
$(PDFLATEX) $<
%.svg : %.pdf
$(PDF2SVG) $^ $@
%.svg.png : %.pdf
$(PDF2PNG) $^ $@
clean :
$(RM) $(PDF_OUT) $(PNG_OUT) $(SVG_OUT) $(CRUFT)
.PHONY : clean all pdf png svg gh-pages