2009-05-19 05:58:53 +01:00
|
|
|
# Makefile to build the AFS Admin 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 possibly specific to Debian and may need to be modified on other
|
|
|
|
# systems.
|
|
|
|
|
2011-06-08 14:42:47 +01:00
|
|
|
BOOK = auagd000
|
|
|
|
|
2011-06-08 15:44:21 +01:00
|
|
|
all: $(BOOK).pdf index.html $(BOOK).epub $(BOOK).mobi
|
2009-05-27 21:44:24 +01:00
|
|
|
|
|
|
|
include @TOP_OBJDIR@/src/config/Makefile.config
|
2011-06-08 14:42:47 +01:00
|
|
|
VERSION=version
|
2009-05-27 21:44:24 +01:00
|
|
|
include @TOP_OBJDIR@/src/config/Makefile.version
|
|
|
|
|
2011-06-08 14:40:17 +01:00
|
|
|
SRCS = $(BOOK).xml auagd005.xml auagd006.xml auagd007.xml auagd008.xml \
|
2009-05-19 05:58:53 +01:00
|
|
|
auagd009.xml auagd010.xml auagd011.xml auagd012.xml auagd013.xml \
|
|
|
|
auagd014.xml auagd015.xml auagd016.xml auagd017.xml auagd018.xml \
|
|
|
|
auagd019.xml auagd020.xml auagd021.xml auagd022.xml auagd023.xml \
|
2011-06-08 14:42:47 +01:00
|
|
|
auagd024.xml auagd025.xml $(VERSION).xml
|
2009-05-27 21:44:24 +01:00
|
|
|
HTML_XSL = @HTML_XSL@
|
2011-06-08 14:40:17 +01:00
|
|
|
DOCBOOK_STYLESHEETS = @DOCBOOK_STYLESHEETS@
|
2009-05-27 21:44:24 +01:00
|
|
|
XSLTPROC = @XSLTPROC@
|
2011-06-03 00:00:47 +01:00
|
|
|
DOCBOOK2PDF = @DOCBOOK2PDF@
|
2011-06-08 15:44:21 +01:00
|
|
|
DBTOEPUB = $(DOCBOOK_STYLESHEETS)/epub/bin/dbtoepub
|
2006-09-16 02:13:22 +01:00
|
|
|
|
2011-06-08 14:42:47 +01:00
|
|
|
index.html: $(SRCS)
|
2009-05-27 21:44:24 +01:00
|
|
|
$(XSLTPROC) --param navig.graphics 1 \
|
2011-06-08 14:40:17 +01:00
|
|
|
--stringparam navig.graphics.path ../ $(DOCBOOK_STYLESHEETS)/$(HTML_XSL) $(BOOK).xml
|
2006-09-16 02:13:22 +01:00
|
|
|
|
2011-06-08 14:42:47 +01:00
|
|
|
$(BOOK).pdf: $(SRCS)
|
2011-06-08 14:40:17 +01:00
|
|
|
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
|
2006-09-16 02:13:22 +01:00
|
|
|
|
2011-06-08 15:44:21 +01:00
|
|
|
$(BOOK).epub: $(SRCS)
|
|
|
|
if test -x "$(DBTOEPUB)" ; then \
|
|
|
|
$(DBTOEPUB) -s $(TOP_SRCDIR)/../doc/xml/mobi-fixup.xsl $(BOOK).xml; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
$(BOOK).mobi: $(BOOK).epub
|
2011-07-25 00:20:05 +01:00
|
|
|
if test -n "$(KINDLEGEN)" && test -x "$(DBTOEPUB)" ; then \
|
|
|
|
kindlegen $(BOOK).epub -o $(BOOK).mobi; \
|
|
|
|
fi
|
2011-06-08 15:44:21 +01:00
|
|
|
|
2006-09-16 02:13:22 +01:00
|
|
|
check:
|
2011-06-08 14:40:17 +01:00
|
|
|
xmllint --noout --valid $(BOOK).xml
|
2009-05-19 05:58:53 +01:00
|
|
|
|
|
|
|
clean:
|
2011-07-25 00:00:35 +01:00
|
|
|
rm -f *.aux *.epub *.fo *.html *.log *.mobi *.out *.pdf
|