openafs/doc/xml/AdminRef/Makefile.in
Chas Williams (CONTRACTOR) fe72b581d7 doc: fix kindle builds of documentation
Use kindlegen located by the configure stage and test for
kindlegen and dbtoepub before building in all cases.

Change-Id: Ieb46023ddf0725a2c93f96e29f942b71343d53dd
Reviewed-on: http://gerrit.openafs.org/8148
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
2012-09-23 22:24:40 -07:00

47 lines
1.3 KiB
Makefile

# Makefile to build the AFS Reference Guide for Unix.
BOOK = auarf000
all: $(BOOK).pdf $(BOOK).epub $(BOOK).mobi
include @TOP_OBJDIR@/src/config/Makefile.config
VERSION=version
include @TOP_OBJDIR@/src/config/Makefile.version
SRCS = $(BOOK).xml preface.xml $(VERSION).xml \
entities.dtd sect1.xml sect5.xml sect8.xml
DOCBOOK_STYLESHEETS = @DOCBOOK_STYLESHEETS@
XSLTPROC = @XSLTPROC@ --stringparam variablelist.as.blocks 1
DOCBOOK2PDF = @DOCBOOK2PDF@
DBTOEPUB = $(DOCBOOK_STYLESHEETS)/epub/bin/dbtoepub
KINDLEGEN = @KINDLEGEN@
entities.dtd sect1.xml sect5.xml sect8.xml:
./generate-xml.pl $(TOP_SRCDIR)
$(BOOK).pdf: $(SRCS)
if test "x$(DOCBOOK2PDF)" = "xfop"; then \
$(XSLTPROC) $(DOCBOOK_STYLESHEETS)/fo/docbook.xsl $(BOOK).xml > $(BOOK).fo; \
$(DOCBOOK2PDF) $(BOOK).fo $(BOOK).pdf; \
else \
$(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 $(BOOK).pdf $(BOOK).mobi $(BOOK).epub $(BOOK).fo \
entities.dtd sect1.xml sect5.xml sect8.xml $(VERSION).xml
rm -rf sect1 sect5 sect8