source: release/1.2/source/doc/src/Makefile.macports @ 9219

Last change on this file since 9219 was 9219, checked in by gb, 12 years ago

synch from trunk

File size: 2.4 KB
Line 
1# -*- coding: unix -*-
2# Use xsltproc and an XSL stylesheet to translate DocBook XML to HTML
3# This require GNU "make", GNU "tar", Posix "find", Posix "date", and
4# "bzip2".  All those external dependencies are, of course, less than
5# ideal.
6
7# for Darwin, with DocBook installed via MacPorts
8
9# The pathname to the xsltproc executable.  Since most alternate
10# translators use Java, this makefile would need to be rewritten to use
11# anything but xsltproc.
12
13XSLTPROC = /usr/bin/xsltproc
14
15# Try to determine the svn revishion
16SVNREV = $(shell /usr/bin/svnversion)
17
18
19# On a new system or when using a new version of xsltproc or of the
20# stylesheet packages, it's a good idea to run with --load-trace and
21# peruse the output to  make sure that none of the stylesheets are being
22# pulled over the network.  It's a significant expense, compounded by
23# the fact that they aren't cached across invocations of xsltproc.  If they
24# are, you should make sure that the correct catalog file is being used
25# (see below), and, if so, that its contents are correct.
26#
27# --nonet can also be useful.
28#
29#EXTRAPARAMS= --load-trace
30EXTRAPARAMS=
31
32# The catalog file tells the translator where to find XSL stylesheets on the
33# local system.  The choice here assumes that you've installed MacPorts in
34# the default location, and run "port install docbook-xml" and
35# "port install docbook-xsl" at some point.
36
37# If not, comment this out, and the translator will automagically
38# look on the web for the stylesheets, instead.
39
40export XML_CATALOG_FILES = /opt/local/etc/xml/catalog
41
42# The local stylesheet imports the generic stylesheets and
43# sets some custom parameters.
44
45STYLESHEET = xsl/openmcl.xsl
46
47# Obtain a temporary ID to be used as the identifier of this invocation of
48# make.
49
50TEMP := build-$(shell date +%s)
51
52# Save the current directory for use in the tarfile target.
53
54CWD := $(shell pwd)
55
56# There's datestamps on the page; let's make sure they're in
57# UTC instead of local time.
58
59export TZ = UTC
60
61# Compute some targets.
62
63XMLFILES = $(wildcard *.xml)
64XSLFILES = $(shell find xsl -name "*.xsl")
65HTMLFILES = ccl-documentation.html
66
67# Save the xsltproc version string for use in debugging.
68
69XSLTPROCVERSION = $(shell $(XSLTPROC) --version | head -n 1)
70
71.PHONY: all clean distclean
72
73all: $(TEMP) $(HTMLFILES) distclean
74
75include makehtml
76
77install: $(HTMLFILES) distclean
78        cp $(HTMLFILES) ../
79
80$(TEMP):
81        mkdir $(TEMP)
82
83clean:
84        rm -rf build-*
85
86distclean: clean
87        rm -f *~
88
Note: See TracBrowser for help on using the repository browser.