source: trunk/doc/faq/Makefile @ 26404

Last change on this file since 26404 was 26404, checked in by boeyms@…, 12 years ago

Pick off some low-hanging fruit to start updating the DocBook documentation:

  • Replace instances of "Darwinports" with "MacPorts", "dport" with "mport", "CVS" with "Subversion" and "cvs" with "svn";
  • Update some of the old email address and links;
  • Make one update about MacPorts no longer supporting OSes other than Mac OS 10.3 and above.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1# $Id: Makefile 26404 2007-06-21 08:53:47Z boeyms@macports.org $
2
3# To build MacPorts 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.