BOOK = auusg000
-all: $(BOOK).pdf index.html
+all: $(BOOK).pdf index.html $(BOOK).epub $(BOOK).mobi
include @TOP_OBJDIR@/src/config/Makefile.config
VERSION=version
DOCBOOK_STYLESHEETS = @DOCBOOK_STYLESHEETS@
XSLTPROC = @XSLTPROC@
DOCBOOK2PDF = @DOCBOOK2PDF@
+DBTOEPUB = $(DOCBOOK_STYLESHEETS)/epub/bin/dbtoepub
+KINDLEGEN = @KINDLEGEN@
index.html: $(SRCS)
$(XSLTPROC) --param navig.graphics 1 \
$(DOCBOOK2PDF) $(BOOK).xml; \
fi
+$(BOOK).epub: $(SRCS)
+ if test -x "$(DBTOEPUB)" ; then \
+ $(DBTOEPUB) -s $(TOP_SRCDIR)/../doc/xml/mobi-fixup.xsl $(BOOK).xml; \
+ fi
+
+$(BOOK).mobi: $(BOOK).epub
+ if test -n "$(KINDLEGEN)" && test -x "$(DBTOEPUB)" ; then \
+ $(KINDLEGEN) $(BOOK).epub -o $(BOOK).mobi; \
+ fi
+
check:
xmllint --noout --valid $(BOOK).xml
clean:
- rm -f *.html *.pdf
+ rm -f *.aux *.epub *.fo *.html *.log *.mobi *.out *.pdf