source: trunk/doc/guide/Makefile @ 4478

Last change on this file since 4478 was 4478, checked in by fkr, 17 years ago

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

big guide-update from wbb@. Thanks Will!

  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 2.0 KB
Line 
1# $Id: Makefile,v 1.8 2004/01/06 09:19:36 fkr Exp $
2
3# To build DarwinPorts  guide files from the source docbook xml.
4# michaelm@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?=
37STRINGPARAMS?=          --stringparam html.stylesheet docbook.css
38
39.PHONY : all
40.PHONY : clean
41#.PHONY : install
42.PHONY : html
43.PHONY : xhtml
44.PHONY : check
45.PHONY : tidy
46
47check:
48        xmllint --xinclude --noout "${SOURCEDIR}/guide.xml"
49
50html:
51        mkdir -p ${HTMLDIR}
52        xsltproc --xinclude -o "${HTMLDIR}/" "${STYLESHEET}" "${SOURCEDIR}/guide.xml"
53       
54xhtml: 
55        mkdir -p ${XHTMLDIR}
56        xsltproc --xinclude ${STRINGPARAMS} -o "${XHTMLDIR}/" "${XSTYLESHEET}" "${SOURCEDIR}/guide.xml"
57
58all: html xhtml tidy
59
60tidy:
61# This target will *only* work if you have installed the www/tidy port
62# or if have tidy from http://tidy.sourceforge.net/ installed somewhere
63# in your path.
64
65        -tidy -quiet -modify -indent ${HTMLDIR}/*
66        -tidy -quiet -modify -indent -xml ${XHTMLDIR}/*
67
68clean:
69        rm -fr ${HTMLDIR} ${XHTMLDIR}
70       
71include ../../base/Mk/dports.autoconf.mk
Note: See TracBrowser for help on using the repository browser.