-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
38 lines (28 loc) · 788 Bytes
/
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
source=chapters/*.md
title='The Refactoring Tales'
filename=therefactoringtales
all: epub pdf mobi html
sale: epub pdf mobi
dir:
mkdir -p books
epub: dir
pandoc -s -o books/$(filename).epub --normalize --smart -t epub $(source) \
--toc \
--title-prefix $(title) \
--epub-metadata build/metadata.xml \
--epub-stylesheet epub.css
pdf: dir
pandoc -s -o books/$(filename).pdf $(source) \
--title-prefix $(title) \
--normalize \
--toc \
--smart
mobi: epub
cd books && kindlegen $(filename).epub
html: dir
pandoc -s -c style.css -t html5 --normalize --smart --toc -o refactoring-tales.html $(source) \
--include-before-body build/author.html \
--title-prefix $(title) \
--include-after-body build/stats.html
compress:
zip -r -X refactoring-tales.zip books