# Makefile for DocBook XML directories # $Revision: 1.9 $ $Date: 2010/05/09 22:08:07 $ #================================================================ # Definitions: #---------------------------------------------------------------- # TARGET: The base file name of the input & output document # TCC_XSL: Where our customization layer lives # XSLT_HTML_OPT passes options to xsltproc to build the HTML form. # To push chunking down to subsections: # --stringparam chunk.section.depth 2 # To move the first subsection to its own chunk: # --stringparam chunk.first.sections 1 # XSLT_FO_OPT: Options for hardcopy. # To push URLs down to footnotes: # --stringparam ulink.footnotes 1 # XEP_OPT: Options to xep # To reduce the amount of output: # -quiet #---------------------------------------------------------------- TARGET = python25 SOURCE = $(TARGET).xml TCC_XSL = /u/www/docs/tcc/doc/docbook43 XSLT_HTML_OPT = --stringparam chunk.section.depth 3 \ --stringparam base.dir web/ \ --stringparam chunk.first.sections 1 \ --stringparam toc.section.depth 3 XSLT_FO_OPT = --stringparam toc.section.depth 3 XEP_OPT = -quiet INDEX_FO = toc.fo INDEX_TARGET = toc.pdf #-- # Add the suffixes that we are interested in #-- # .xml Input files in DocBook XML format # .fo XSL-FO output # .html HTML web pages # .ps PostScript files # .pdf Page Description Format (Abode) #-- .SUFFIXES: .xml .html .fo .ps .pdf #================================================================ # Default suffix rules #---------------------------------------------------------------- .xml.html: xsltproc -o $@ $(XSLT_HTML_OPT) $(TCC_XSL)/tcc_html.xsl $< .xml.fo: xsltproc -o $@ $(XSLT_FO_OPT) $(TCC_XSL)/tcc_fo.xsl $< .fo.pdf: xep $(XEP_OPT) $< $@ #================================================================ # Targets #---------------------------------------------------------------- all: web pdf index web: $(TARGET).html pdf: $(TARGET).pdf index: $(INDEX_TARGET) $(INDEX_TARGET): $(INDEX_FO) $(INDEX_FO): $(SOURCE) rm -f $(INDEX_FO); \ docbookindex $(TARGET).xml clean: rm -f $(TARGET).fo $(TARGET).pdf *.html; \ ln -s $(HTML_TARGET) index.html