-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
37 lines (27 loc) · 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
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/regexes.pod \
src/grammars.pod
# 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 && 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