/
Makefile
43 lines (32 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
CHAPTERS = \
src/preface.pod \
src/basics.pod \
src/operators.pod \
src/subs-n-sigs.pod \
src/multi-dispatch.pod \
src/classes-and-objects.pod \
src/roles.pod \
src/subtypes.pod \
src/regexes.pod \
src/grammars.pod \
src/builtins.pod \
PERL = perl
# If you're on a Mac, and installed Inkscape via MacPorts, you might want to
# manually uncomment the next line, and remove the one after it.
#INKSCAPE = /Applications/Inkscape.app/Contents/Resources/bin/inkscape
INKSCAPE = inkscape
default: build/book.pdf
release: build/book.pdf
cp build/book.pdf build/book-$$(date +"%Y-%m").pdf
build/mmd-table.pdf: src/mmd-table.svg
$(INKSCAPE) --export-pdf=build/mmd-table.pdf -D src/mmd-table.svg
build/book.html: $(CHAPTERS) bin/book-to-html
$(PERL) bin/book-to-html $(CHAPTERS) > build/book.html
build/book.pdf: build/book.tex build/mmd-table.pdf
cd build && pdflatex book.tex && makeindex book && pdflatex book.tex
build/book.tex: $(CHAPTERS) bin/book-to-latex
$(PERL) bin/book-to-latex $(CHAPTERS) > build/book.tex
clean:
rm -rf build/*
.PHONY: clean
# vim: set noexpandtab