1# Copyright 2006 John Maddock, Paul A. Bristow and Xiaogang Zhang. 2# Distributed under the Boost Software License, Version 1.0. 3# (See accompanying file LICENSE_1_0.txt or copy at 4# http://www.boost.org/LICENSE_1_0.txt). 5# 6# Example makefile that builds the docs. 7# Note that all the following paths will have to be changed to match 8# your actual installation paths. 9# 10 11# Path to quickbook executable: 12QB="C:/download/open/xml/bin/quickbook.exe" 13 14# Path to xsltproc: 15XSLTPROC="C:/download/open/xml/bin/xsltproc-win32/xsltproc.exe" 16 17# Path to Boost Trunc: 18BOOST=c:/data/boost/boost/trunk 19 20# Path to FO processor (XEP): 21FO=C:/Progra~1/xep/xep.bat 22 23# Configuration options: 24COMMON_XSL_PARAM=--stringparam admon.graphics "1" --stringparam body.start.indent "0pt" --stringparam chunk.first.sections "1" --stringparam chunk.section.depth "10" --stringparam fop.extensions "0" --stringparam generate.section.toc.level "10" --stringparam html.stylesheet "../../../../../../trunk/doc/html/boostbook.css" --stringparam navig.graphics "1" --stringparam page.margin.inner "0.5in" --stringparam page.margin.outer "0.5in" --stringparam paper.type "A4" --stringparam toc.max.depth "4" --stringparam toc.section.depth "10" --stringparam xep.extensions "1" 25PDF_XSL_PARAM=--stringparam admon.graphics.extension ".svg" --stringparam use.role.for.mediaobject 1 --stringparam preferred.mediaobject.role print --stringparam admon.graphics.path "../html/images/" 26HTML_XSL_PARAM= 27PROJECT_NAME=math 28 29all : pdf html 30 31pdf : pdf/$(PROJECT_NAME).pdf 32html : html/index.html 33 34xml/$(PROJECT_NAME).xml : 35 -mkdir xml 36 $(QB) --output-file=xml\$(PROJECT_NAME).xml $(PROJECT_NAME).qbk 37 38xml/$(PROJECT_NAME).docbook : xml\$(PROJECT_NAME).xml xml/catalog.xml 39 set XML_CATALOG_FILES=xml/catalog.xml 40 $(XSLTPROC) $(COMMON_XSL_PARAM) --xinclude -o "xml\$(PROJECT_NAME).docbook" "$(BOOST)\tools\boostbook\xsl\docbook.xsl" "xml\$(PROJECT_NAME).xml" 41 42xml/$(PROJECT_NAME).fo : xml\$(PROJECT_NAME).docbook xml/catalog.xml 43 set XML_CATALOG_FILES=xml/catalog.xml 44 $(XSLTPROC) $(COMMON_XSL_PARAM) $(PDF_XSL_PARAM) --xinclude -o "xml\$(PROJECT_NAME).fo" "$(BOOST)\tools\boostbook\xsl\fo.xsl" "xml\$(PROJECT_NAME).docbook" 45 46pdf/$(PROJECT_NAME).pdf : xml\$(PROJECT_NAME).fo 47 -mkdir pdf 48 set JAVA_HOME=C:/PROGRA~1/Java/j2re1.4.2_12 49 call $(FO) xml\$(PROJECT_NAME).fo pdf\$(PROJECT_NAME).pdf 50 51html/index.html : xml\$(PROJECT_NAME).fo 52 -mkdir html 53 set XML_CATALOG_FILES=xml/catalog.xml 54 $(XSLTPROC) $(COMMON_XSL_PARAM) $(HTML_XSL_PARAM) --xinclude -o "html/" "$(BOOST)\tools\boostbook\xsl\html.xsl" "xml\$(PROJECT_NAME).docbook" 55 56xml/catalog.xml : 57 @echo <<xml/catalog.xml 58<?xml version="1.0"?> 59<!DOCTYPE catalog 60 PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN" 61 "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> 62<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> 63 <rewriteURI uriStartString="http://www.boost.org/tools/boostbook/dtd/" rewritePrefix="file:///$(BOOST)/tools/boostbook/dtd/"/> 64 <rewriteURI uriStartString="http://docbook.sourceforge.net/release/xsl/current/" rewritePrefix="file:///C:/download/open/xml/docbook-xsl-snapshot/"/> 65 <rewriteURI uriStartString="http://www.oasis-open.org/docbook/xml/4.2/" rewritePrefix="file:///C:/download/open/xml/docbook-xml/"/> 66</catalog> 67<< 68 69 70 71 72 73 74