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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
# Makefile to build the AFS QuickStart guide for Unix.
#
# This makefile assumes that various utilities are available on the system.
# On Debian lenny, installing the packages:
#
# dblatex
# docbook-xsl
# libxml2-utils
# xsltproc
#
# gave me all the utilities needed.
#
# HTML_XSL is specific to Debian and will need to be modified on other
# systems until we have a better mechanism for finding the correct path.
srcdir=@srcdir@
BOOK = auqbg000
all: $(BOOK).pdf index.html $(BOOK).epub $(BOOK).mobi
include @TOP_OBJDIR@/src/config/Makefile.config
VERSION=version
include @TOP_OBJDIR@/src/config/Makefile.version
SRCS = $(BOOK).xml auqbg003.xml auqbg004.xml auqbg005.xml auqbg006.xml \
auqbg007.xml auqbg008.xml appendix.xml appendix_dafs.xml \
$(VERSION).xml
HTML_XSL = @HTML_XSL@
DOCBOOK_STYLESHEETS = @DOCBOOK_STYLESHEETS@
XSLTPROC = @XSLTPROC@
DOCBOOK2PDF = @DOCBOOK2PDF@
DBTOEPUB = $(DOCBOOK_STYLESHEETS)/epub/bin/dbtoepub
KINDLEGEN = @KINDLEGEN@
XSL_FLAGS = --path '@abs_builddir@'
index.html: $(SRCS)
$(XSLTPROC) $(XSL_FLAGS) \
--param navig.graphics 1 \
--param use.id.as.filename 1 \
--stringparam navig.graphics.path ../ $(DOCBOOK_STYLESHEETS)/$(HTML_XSL) \
$(srcdir)/$(BOOK).xml
$(BOOK).pdf: $(SRCS)
if test "x$(DOCBOOK2PDF)" = "xfop"; then \
$(XSLTPROC) $(XSL_FLAGS) \
$(DOCBOOK_STYLESHEETS)/fo/docbook.xsl \
$(srcdir)/$(BOOK).xml > $(BOOK).fo; \
$(DOCBOOK2PDF) $(BOOK).fo $(BOOK).pdf; \
else \
$(DOCBOOK2PDF) --output=$@ --xslt-opts="$(XSL_FLAGS)" \
$(srcdir)/$(BOOK).xml; \
fi
$(BOOK).epub: $(SRCS)
if test -x "$(DBTOEPUB)" ; then \
$(DBTOEPUB) -s $(TOP_SRCDIR)/../doc/xml/mobi-fixup.xsl \
$(srcdir)/$(BOOK).xml; \
fi
$(BOOK).mobi: $(BOOK).epub
if test -n "$(KINDLEGEN)" && test -x "$(DBTOEPUB)" ; then \
$(KINDLEGEN) $(BOOK).epub -o $(BOOK).mobi; \
fi
check:
xmllint $(XSL_FLAGS) --noout --valid $(srcdir)/$(BOOK).xml
clean:
rm -f *.aux *.epub *.fo *.html *.log *.mobi *.out *.pdf
|