forked from Open-Advice/Open-Advice
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
46 lines (35 loc) · 1.09 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
default: pdf
all: pdf mobi epub
# 10-12" screen readers, tablets, etc
pdf: Open-Advice.pdf
# only really useful as a e-reader pre-stage
html: Open-Advice.html
# recommended for Amazon Kindle 7/8" screen readers
mobi: Open-Advice.mobi
# for everyone elses 7/8" screen readers
epub: Open-Advice.epub
AUTHORS = "Lydia Pintscher"
COVER = "frontcover.jpg"
####### Helpers #######
%.pdf: %.tex
pdflatex $<
pdflatex $<
%.html: %.tex
htlatex $< "xhtml,fn-in"
%.epub: %.html
# requires calibre
ebook-convert $< $(basename $<).epub \
--cover $(COVER) \
--authors $(AUTHORS)
%.mobi: %.html
# requires calibre
ebook-convert $< $(basename $<).mobi \
--cover $(COVER) \
--authors $(AUTHORS)
clean:
-rm -rf Open-Advice.pdf Open-Advice.log Open-Advice.toc Open-Advice.aux
-rm -rf Open-Advice.out Open-Advice.tdo Open-Advice.xmpi
-rm -rf Open-Advice*.html Open-Advice.css Open-Advice.4* Open-Advice.idv
-rm -rf Open-Advice.lg Open-Advice.dvi Open-Advice.tmp Open-Advice.toc Open-Advice.xref
-rm -rf Open-Advice.epub Open-Advice.mobi
-find . -name "*.aux" -and -not -path ./.git -prune | xargs rm -f