doc: prefer fop to generate pdf from docbook
[openafs.git] / doc / xml / AdminGuide / Makefile.in
1 # Makefile to build the AFS Admin Guide for Unix.
2 #
3 # This makefile assumes that various utilities are available on the system.
4 # On Debian lenny, installing the packages:
5 #
6 #     dblatex
7 #     docbook-xsl
8 #     libxml2-utils
9 #     xsltproc
10 #
11 # gave me all the utilities needed.
12 #
13 # HTML_XSL is possibly specific to Debian and may need to be modified on other
14 # systems.
15
16 all: pdf html
17
18 include @TOP_OBJDIR@/src/config/Makefile.config
19 VERSFILE=version
20 include @TOP_OBJDIR@/src/config/Makefile.version
21
22 BOOK     = auagd000
23 SRCS     = $(BOOK).xml auagd005.xml auagd006.xml auagd007.xml auagd008.xml \
24            auagd009.xml auagd010.xml auagd011.xml auagd012.xml auagd013.xml \
25            auagd014.xml auagd015.xml auagd016.xml auagd017.xml auagd018.xml \
26            auagd019.xml auagd020.xml auagd021.xml auagd022.xml auagd023.xml \
27            auagd024.xml auagd025.xml
28 HTML_XSL = @HTML_XSL@
29 DOCBOOK_STYLESHEETS = @DOCBOOK_STYLESHEETS@
30 XSLTPROC = @XSLTPROC@
31 DOCBOOK2PDF = @DOCBOOK2PDF@
32
33 html: $(SRCS) $(VERSFILE).xml
34         $(XSLTPROC) --param navig.graphics 1 \
35             --stringparam navig.graphics.path ../ $(DOCBOOK_STYLESHEETS)/$(HTML_XSL) $(BOOK).xml
36
37 pdf: $(SRCS) $(VERSFILE).xml
38         if test "x$(DOCBOOK2PDF)" = "xfop"; then \
39                 $(XSLTPROC) $(DOCBOOK_STYLESHEETS)/fo/docbook.xsl $(BOOK).xml > $(BOOK).fo; \
40                 $(DOCBOOK2PDF) $(BOOK).fo $(BOOK).pdf; \
41         else \
42                 $(DOCBOOK2PDF) $(BOOK).xml; \
43         fi
44
45 check:
46         xmllint --noout --valid $(BOOK).xml
47
48 clean:
49         rm -f *.html *.pdf