blob: a67aa0330f1d86721aa0e27677f9773e8214491c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
|
#----------------------------------------------------------------------------
#
# Makefile
# Postgres documentation makefile
# Thomas Lockhart
#
# Copyright (c) 1994, Regents of the University of California
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.33 2001/03/06 20:41:06 petere Exp $
#
#----------------------------------------------------------------------------
subdir = doc/src/sgml
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
.SECONDARY:
.NOTPARALLEL:
ifndef DOCBOOKSTYLE
DOCBOOKSTYLE = /home/projects/pgsql/developers/thomas/db143.d/docbook
endif
ifndef JADE
JADE = jade
endif
SGMLINCLUDE = -D ref -D ../graphics
ifndef NSGMLS
NSGMLS = nsgmls
endif
ifndef SGMLSPL
SGMLSPL = sgmlspl
endif
# docbook2man generates man pages from docbook refentry source code.
ifndef D2MDIR
# This is where the (patched) docbook2man perl scripts reside on hub.org.
D2MDIR= /home/users/t/thomas/d2x/docbook2man
endif
D2MSCRIPT= $(D2MDIR)/docbook2man-spec.pl
vpath %.sgml ./ref
ALLBOOKS = admin developer programmer reference tutorial user
ALLSGML := $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml)
catalog: Makefile $(top_builddir)/src/Makefile.global
(echo "PUBLIC \"-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN\" \"$(DOCBOOKSTYLE)/html/docbook.dsl\""; \
echo "PUBLIC \"-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN\" \"$(DOCBOOKSTYLE)/print/docbook.dsl\"") > $@
ifeq "$(origin DOCBOOKSTYLE)" "command line"
.PHONY: catalog
endif
##
## Man pages
##
.PHONY: man
DEFAULTSECTION := l
man: $(ALLSGML)
$(NSGMLS) $(NSGMLS_FLAGS) $(srcdir)/book-decl.sgml $(srcdir)/reference.sgml \
| $(SGMLSPL) $(D2MSCRIPT) --lowercase --section $(DEFAULTSECTION)
# One more time, to resolve cross-references
$(NSGMLS) $(NSGMLS_FLAGS) $(srcdir)/book-decl.sgml $(srcdir)/reference.sgml \
| $(SGMLSPL) $(D2MSCRIPT) --lowercase --section $(DEFAULTSECTION)
$(mkinstalldirs) man1 man$(DEFAULTSECTION)
mv *.1 man1/
mv *.$(DEFAULTSECTION) man$(DEFAULTSECTION)/
##
## HTML
##
JADE.html = $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -d stylesheet.dsl -i output-html -t sgml
postgres.html: postgres.sgml $(ALLSGML) stylesheet.dsl catalog
@rm -f *.html
$(JADE.html) $<
ln -sf $@ index.html
$(addsuffix .html, $(ALLBOOKS)): %.html: %.sgml $(ALLSGML) stylesheet.dsl catalog
@rm -f *.html
$(JADE.html) book-decl.sgml $<
ln -sf $@ index.html
##
## Print
##
# RTF to allow minor editing for hardcopy
$(addsuffix .rtf, $(ALLBOOKS)): %.rtf: %.sgml $(ALLSGML) stylesheet.dsl catalog
$(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -d stylesheet.dsl -t rtf -V rtf-backend -i output-print book-decl.sgml $<
# TeX and DVI
$(addsuffix .tex, $(ALLBOOKS)): %.tex: %.sgml $(ALLSGML) stylesheet.dsl catalog
$(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -d stylesheet.dsl -t tex -V tex-backend -i output-print book-decl.sgml $<
%.dvi: %.tex
jadetex $<
jadetex $<
jadetex $<
# Postscript from TeX
%.ps: %.dvi
dvips -o $@ $<
%.pdf: %.tex
pdfjadetex $<
pdfjadetex $<
pdfjadetex $<
# Graphics
%.gif:
cp -p ../graphics/$@ .
##
## Semi-automatic generation of some text files.
##
INSTALL HISTORY: % : %.html
@echo "|";\
echo "| You should now take \`$<', save it as a text file in Netscape,";\
echo "| and put it in place of the existing \`$@' file.";\
echo "|"
INSTALL.html HISTORY.html: %.html : tempfile_%.html
sed 's/Chapter 1. *//g' $< >$@
tempfile_INSTALL.html tempfile_HISTORY.html: tempfile_%.html : tempfile_%.sgml
$(JADE.html) -V nochunks $< >$@
tempfile_INSTALL.sgml: standalone-install.sgml installation.sgml
cat $+ >$@
tempfile_HISTORY.sgml: release.sgml
( echo '<!doctype chapter PUBLIC "-//OASIS//DTD DocBook V3.1//EN">'; \
cat $< ) >$@
.INTERMEDIATE: tempfile_INSTALL.html tempfile_HISTORY.html tempfile_INSTALL.sgml tempfile_HISTORY.sgml
##
## Check
##
check: $(addprefix check-, $(ALLBOOKS)) check-postgres
# Quick syntax check without style processing
$(addprefix check-, $(ALLBOOKS)): check-%: %.sgml
$(NSGMLS) $(SGMLINCLUDE) -s book-decl.sgml $<
check-postgres: postgres.sgml
$(NSGMLS) $(SGMLINCLUDE) -s $<
##
## Clean
##
clean distclean maintainer-clean:
rm -f catalog
# HTML
rm -f HTML.manifest *.html
# man
rm -rf *.1 *.$(DEFAULTSECTION) man1 man$(DEFAULTSECTION) manpage.refs manpage.links manpage.log
# print
rm -f *.rtf *.tex *.dvi *.aux *.log *.ps *.pdf
|