source: trunk/doc/guide/Makefile @ 2759

Last change on this file since 2759 was 2759, checked in by michaelm, 17 years ago

renamed catalog variable to correct name...

  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 2.0 KB
Line 
1# $Id: Makefile,v 1.6 2003/06/06 16:05:21 michaelm 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
29
30SOURCEDIR?=             xml
31DOCBOOK_XSL?=           ${PREFIX}/share/xsl/docbook-xsl/1.61.0
32HTMLDIR?=               html
33XHTMLDIR?=              xhtml
34STYLESHEET?=            ${DOCBOOK_XSL}/html/chunk.xsl
35XSTYLESHEET?=           ${DOCBOOK_XSL}/xhtml/chunk.xsl
36XML_CATALOG_FILES?=    ${PREFIX}/etc/xml/catalog
37XML_DEBUG_CATALOG?=
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 -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.mk
Note: See TracBrowser for help on using the repository browser.