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

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

synch from trunk

File size: 2.6 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 Linux (Fedora; other distros may require some tweaking.)
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
16# On a new system or when using a new version of xsltproc or of the
17# stylesheet packages, it's a good idea to run with --load-trace and
18# peruse the output to  make sure that none of the stylesheets are being
19# pulled over the network.  It's a significant expense, compounded by
20# the fact that they aren't cached across invocations of xsltproc.  If they
21# are, you should make sure that the correct catalog file is being used
22# (see below), and, if so, that its contents are correct.
23#EXTRAPARAMS= --load-trace
24EXTRAPARAMS= --xinclude --nonet
25
26# The catalog file tells the translator where to find XSL stylesheets on the
27# local system.  The first choice here is what should be used for builds
28# which are going to take place on the clozure.com server.  The second is
29# for when you have installed docbook on OS X using the fink package manager.
30# If neither applies, comment both out, and the translator will automagically
31# look on the web for the stylesheets, instead.
32
33
34export XML_CATALOG_FILES = xsl/catalog-fedora
35
36# The local stylesheet imports the generic stylesheets and
37# sets some custom parameters.
38
39STYLESHEET = xsl/openmcl.xsl
40
41# Obtain a temporary ID to be used as the identifier of this invocation of
42# make.
43
44TEMP := build-$(shell date +%s)
45
46# Save the current directory for use in the tarfile target.
47
48CWD := $(shell pwd)
49
50# There's datestamps on the page; let's make sure they're in
51# UTC instead of local time.
52
53export TZ = UTC
54
55# Compute some targets.
56
57XMLFILES = $(wildcard *.xml)
58XSLFILES = $(shell find xsl -name "*.xsl")
59HTMLFILES = ccl-documentation.html
60
61# Save the xsltproc version string for use in debugging.
62
63XSLTPROCVERSION = $(shell $(XSLTPROC) --version | head -n 1)
64
65# Try to determine the svn revishion
66SVNREV = $(shell /usr/bin/svnversion)
67
68
69.PHONY: all clean distclean
70
71all: $(TEMP) $(HTMLFILES) distclean
72
73include makehtml
74
75install: $(HTMLFILES) distclean
76        cp $(HTMLFILES) ../
77
78$(TEMP):
79        mkdir $(TEMP)
80
81clean:
82        rm -rf build-*
83
84distclean: clean
85        rm -f *~
86
87# All this rigamarole is to make the pathnames stored in the tarfile
88# have a uniform prefix regardless of where the build directory actually
89# is.  Somebody, please tell me I have overlooked something obvious.
90
Note: See TracBrowser for help on using the repository browser.