source: trunk/doc/faq/Makefile @ 5204

Last change on this file since 5204 was 5204, checked in by wbb4, 17 years ago

Bug:
Submitted by:
Reviewed by:
Approved by:
Obtained from:

Added the basis for a new FAQ based on bits of the old one written by Jordan. There are a few issues with this one (aside from the lack of much meaningful content), the css stylesheet needs tweaking and merging with the one used for the Guide, and I've experienced problems with the xsl output.

  • Property svn:eol-style set to native
File size: 2.3 KB
Line 
1# $Id: Makefile,v 1.1 2004/02/05 05:36:36 wbb4 Exp $
2
3# To build DarwinPorts FAQ files from the source docbook xml.
4# michaelm@opendarwin.org, wbb4@opendarwin.org
5
6## Targets
7#
8# html  : Makes unformated, chunked html from xml
9# xhtml : Makes unformated, chunked xhtml from xml
10# tidy  : Tidies (formats, indents) xhtml and html
11# clean : Deletes html and xhtml
12# all   : html, xhtml and tidy
13
14## Details and Caveats
15#
16# Requires docbook-xsl and docbook-xml ports to have been installed (or the
17# stylesheets and dtds to have been installed elswhere, and requires the
18# libxslt port to be installed.
19
20# This Makefile assumes things have been installed using prefix, you may want
21# to override some of the variables below to match your local installation.
22
23# To use local dtd catalogs you must first create the catalog, I currently assume
24# the catalogs are in ${prefix}/etc/xml, if yours are elswhere you should alter
25# the $XML_CATALOG_FILES variable.
26
27# set XML_DEBUG_CATALOG= to see catalog debugging info
28
29SOURCEDIR?=             xml
30DOCBOOK_XSL?=           ${prefix}/share/xsl/docbook-xsl/
31HTMLDIR?=               html
32XHTMLDIR?=              xhtml
33STYLESHEET?=            ${DOCBOOK_XSL}/html/chunk.xsl
34XSTYLESHEET?=           ${DOCBOOK_XSL}/xhtml/chunk.xsl
35XML_CATALOG_FILES?=    ${prefix}/etc/xml/catalog
36XML_DEBUG_CATALOG?=
37CSS_STYLESHEET?=        docbook.css
38RESOURCES?=             resources/
39STRINGPARAMS?=          --stringparam html.stylesheet ${CSS_STYLESHEET} \
40                                        --stringparam qanda.defaultlabel number \
41                                        --stringparam qanda.inherit.numeration 1
42
43.PHONY : all
44.PHONY : clean
45#.PHONY : install
46.PHONY : html
47.PHONY : xhtml
48.PHONY : check
49.PHONY : tidy
50
51check:
52        xmllint --xinclude --noout "${SOURCEDIR}/faq.xml"
53
54html:
55        mkdir -p ${HTMLDIR}
56        xsltproc --xinclude -o "${HTMLDIR}/" "${STYLESHEET}" "${SOURCEDIR}/faq.xml"
57       
58xhtml: 
59        mkdir -p ${XHTMLDIR}
60        cp ${RESOURCES}${CSS_STYLESHEET} ${XHTMLDIR}
61        xsltproc --xinclude ${STRINGPARAMS} -o "${XHTMLDIR}/" "${XSTYLESHEET}" "${SOURCEDIR}/faq.xml"
62
63all: html xhtml tidy
64
65tidy:
66# This target will *only* work if you have installed the www/tidy port
67# or if have tidy from http://tidy.sourceforge.net/ installed somewhere
68# in your path.
69
70        -tidy -quiet -modify -indent ${HTMLDIR}/*
71        -tidy -quiet -modify -indent -xml ${XHTMLDIR}/*
72
73clean:
74        rm -fr ${HTMLDIR} ${XHTMLDIR}
75       
76include ../../base/Mk/dports.autoconf.mk
Note: See TracBrowser for help on using the repository browser.