-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
30 lines (24 loc) · 616 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
TARGETS = kodemus.pdf kodemus.epub kodemus.txt kodemus.html kodemus.mobi
all: lint $(TARGETS)
XMLLINTOPTS = --nonet --noout --xinclude --postvalid
lint: kodemus.xml
xmllint $(XMLLINTOPTS) $<
%.pdf: %.xml
if false ; then \
dblatex -T simple -P latex.class.options=a4paper $< ; \
else \
xsltproc --output tmp.fo \
stylesheet-fo.xsl \
$< ; \
fop -fo tmp.fo -pdf $@ ; \
fi
%.epub: %.xml
dbtoepub -s stylesheet-epub.xsl $<
%.txt: %.xml
xmlto -x stylesheet-html.xsl txt $<
%.html: %.xml
xmlto -x stylesheet-html.xsl html-nochunks $<
%.mobi: %.epub
ebook-convert $< $@
clean:
$(RM) $(TARGETS)