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

Last change on this file since 9074 was 8574, checked in by rme, 12 years ago

Yet more makefile fiddling.

Makefile.macports is for Mac OS X users. It assumes that you will install
MacPorts?, and use "port install docbook-xsl" and "port install docbook-xml".

File size: 2.7 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 [0-9][0-9]-*.xml) ccl-documentation.xml
58XSLFILES = $(shell find xsl -name "*.xsl")
59#HTMLFILES = $(patsubst %.xml,%.html, $(XMLFILES))
60HTMLFILES = ccl-documentation.html
61
62# Save the xsltproc version string for use in debugging.
63
64XSLTPROCVERSION = $(shell $(XSLTPROC) --version | head -n 1)
65
66.PHONY: all clean distclean
67
68all: $(TEMP) $(HTMLFILES) distclean
69
70include makehtml
71
72install: $(HTMLFILES) distclean
73        cp $(HTMLFILES) ../HTML
74
75$(TEMP):
76        mkdir $(TEMP)
77
78clean:
79        rm -rf build-*
80
81distclean: clean
82        rm -f *~
83
84# All this rigamarole is to make the pathnames stored in the tarfile
85# have a uniform prefix regardless of where the build directory actually
86# is.  Somebody, please tell me I have overlooked something obvious.
87
Note: See TracBrowser for help on using the repository browser.