forked from MarkLodato/visual-git-guide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
75 lines (64 loc) · 1.4 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Instructions for pushing:
# make gh-pages
# git push
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-de.html \
index-en.html \
index-es.html \
index-fr.html \
index-it.html \
index-ja.html \
index-ko.html \
index-pl.html \
index-pt.html \
index-ru.html \
index-sk.html \
index-vi.html \
index-zh-cn.html \
index-zh-tw.html \
translate-en.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