doc: prefer fop to generate pdf from docbook
[openafs.git] / doc / xml / AdminGuide / Makefile.in
index d442707..e9ada21 100644 (file)
@@ -19,25 +19,31 @@ include @TOP_OBJDIR@/src/config/Makefile.config
 VERSFILE=version
 include @TOP_OBJDIR@/src/config/Makefile.version
 
-BOOK     = auagd000.xml
-SRCS     = $(BOOK) auagd005.xml auagd006.xml auagd007.xml auagd008.xml \
+BOOK     = auagd000
+SRCS     = $(BOOK).xml auagd005.xml auagd006.xml auagd007.xml auagd008.xml \
           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 \
           auagd024.xml auagd025.xml
 HTML_XSL = @HTML_XSL@
+DOCBOOK_STYLESHEETS = @DOCBOOK_STYLESHEETS@
 XSLTPROC = @XSLTPROC@
 DOCBOOK2PDF = @DOCBOOK2PDF@
 
 html: $(SRCS) $(VERSFILE).xml
        $(XSLTPROC) --param navig.graphics 1 \
-           --stringparam navig.graphics.path ../ $(HTML_XSL) $(BOOK)
+           --stringparam navig.graphics.path ../ $(DOCBOOK_STYLESHEETS)/$(HTML_XSL) $(BOOK).xml
 
 pdf: $(SRCS) $(VERSFILE).xml
-       $(DOCBOOK2PDF) $(BOOK)
+       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
 
 check:
-       xmllint --noout --valid $(BOOK)
+       xmllint --noout --valid $(BOOK).xml
 
 clean:
        rm -f *.html *.pdf