source: trunk/doc/guide/Makefile @ 29473

Last change on this file since 29473 was 29473, checked in by simon@…, 13 years ago

doc/guide: Removed the data of the new guide as it is now in doc-new, also
reverted the Makefile to its state before the new guide. I hope this doesn't
cause any problems.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
1# $Id: Makefile 29473 2007-09-24 20:14:51Z simon@macports.org $
2
3# To build MacPorts  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?=
37CSS_STYLESHEET?=        docbook.css
38RESOURCES?=             resources/
39STRINGPARAMS?=          --stringparam html.stylesheet ${CSS_STYLESHEET} --stringparam chunk.section.depth 0
40
41.PHONY : all
42.PHONY : clean
43#.PHONY : install
44.PHONY : html
45.PHONY : xhtml
46.PHONY : check
47.PHONY : tidy
48
49check:
50        xmllint --xinclude --noout "${SOURCEDIR}/guide.xml"
51
52html:
53        mkdir -p ${HTMLDIR}
54        xsltproc --xinclude -o "${HTMLDIR}/" "${STYLESHEET}" "${SOURCEDIR}/guide.xml"
55
56xhtml: 
57        mkdir -p ${XHTMLDIR}
58        cp ${RESOURCES}${CSS_STYLESHEET} ${XHTMLDIR}
59        xsltproc --xinclude ${STRINGPARAMS} -o "${XHTMLDIR}/" "${XSTYLESHEET}" "${SOURCEDIR}/guide.xml"
60
61all: html xhtml tidy
62
63tidy:
64# This target will *only* work if you have installed the www/tidy port
65# or if have tidy from http://tidy.sourceforge.net/ installed somewhere
66# in your path.
67
68        -tidy -quiet -modify -indent ${HTMLDIR}/*
69        -tidy -quiet -modify -indent -xml ${XHTMLDIR}/*
70
71clean:
72        rm -fr ${HTMLDIR} ${XHTMLDIR}
73
74include ../../base/Mk/macports.autoconf.mk
Note: See TracBrowser for help on using the repository browser.