@@ -217,10 +217,9 @@ postgres.pdf:
217
217
218
218
219
219
# #
220
- # # Semi-automatic generation of some text files.
220
+ # # Generation of some text files.
221
221
# #
222
222
223
- JADE.text = $(JADE ) $(JADEFLAGS ) $(SGMLINCLUDE ) $(CATALOG ) -d stylesheet.dsl -i output-text -t sgml
224
223
ICONV = iconv
225
224
LYNX = lynx
226
225
@@ -233,10 +232,15 @@ LYNX = lynx
233
232
# locale support and is very picky about locale name spelling. The
234
233
# below has been finely tuned to run on FreeBSD and Linux/glibc.
235
234
INSTALL : % : % .html
236
- $(PERL ) -p -e ' s/<H (1|2)$$/<H \1 align=center/ g' $< | LC_ALL=en_US.ISO8859-1 $(LYNX ) -force_html -dump -nolist -stdin | $(ICONV ) -f latin1 -t us-ascii//TRANSLIT > $@
235
+ $(PERL ) -p -e ' s,<h (1|2) class="title",<h \1 align=center, g' $< | LC_ALL=en_US.ISO8859-1 $(LYNX ) -force_html -dump -nolist -stdin | $(ICONV ) -f latin1 -t us-ascii//TRANSLIT > $@
237
236
238
- INSTALL.html : standalone-install.sgml installation.sgml version.sgml
239
- $(JADE.text ) -V nochunks standalone-install.sgml installation.sgml > $@
237
+ INSTALL.html : % .html : stylesheet-text.xsl % .xml
238
+ $(XMLLINT ) --noout --valid $* .xml
239
+ $(XSLTPROC ) $(XSLTPROCFLAGS ) $(XSLTPROC_HTML_FLAGS ) $^ > $@
240
+
241
+ INSTALL.xml : standalone-install.sgml installation.sgml version.sgml
242
+ $(OSX ) -D. -x lower $(filter-out version.sgml,$^ ) > $@ .tmp
243
+ $(call mangle-xml,chapter)
240
244
241
245
242
246
# #
@@ -247,12 +251,15 @@ INSTALL.html: standalone-install.sgml installation.sgml version.sgml
247
251
# if we try to do "make all" in a VPATH build without the explicit
248
252
# $(srcdir) on the postgres.sgml dependency in this rule. GNU make bug?
249
253
postgres.xml : $(srcdir ) /postgres.sgml $(ALMOSTALLSGML )
250
- $(OSX ) -D. -x lower -i include-xslt-index $< > postgres.xmltmp
251
- $(PERL ) -p -e ' s/\[(aacute|acirc|aelig|agrave|amp|aring|atilde|auml|bull|copy|eacute|egrave|gt|iacute|lt|mdash|nbsp|ntilde|oacute|ocirc|oslash|ouml|pi|quot|scaron|uuml) *\]/\&\1;/gi;' \
252
- -e ' $$_ .= qq{<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">\n} if $$. == 1;' \
253
- < postgres.xmltmp > $@
254
- rm postgres.xmltmp
255
- # ' hello Emacs
254
+ $(OSX ) -D. -x lower -i include-xslt-index $< > $@ .tmp
255
+ $(call mangle-xml,book)
256
+
257
+ define mangle-xml
258
+ $(PERL ) -p -e 's/\[(aacute|acirc|aelig|agrave|amp|aring|atilde|auml|bull|copy|eacute|egrave|gt|iacute|lt|mdash|nbsp|ntilde|oacute|ocirc|oslash|ouml|pi|quot|scaron|uuml) *\]/\&\1;/gi;' \
259
+ -e '$$_ .= qq{<!DOCTYPE $(1 ) PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">\n} if $$. == 1;' \
260
+ <$@ .tmp > $@
261
+ rm $@ .tmp
262
+ endef
256
263
257
264
ifeq ($(STYLE ) ,website)
258
265
XSLTPROC_HTML_FLAGS += --param website.stylesheet 1
@@ -386,21 +393,21 @@ check-tabs:
386
393
# This allows removing some files from the distribution tarballs while
387
394
# keeping the dependencies satisfied.
388
395
.SECONDARY : postgres.xml $(GENERATED_SGML ) HTML.index
389
- .SECONDARY : INSTALL.html
396
+ .SECONDARY : INSTALL.html INSTALL.xml
390
397
.SECONDARY : % -A4.tex-ps % -US.tex-ps % -A4.tex-pdf % -US.tex-pdf
391
398
392
399
clean :
393
400
# text --- these are shipped, but not in this directory
394
401
rm -f INSTALL
395
- rm -f INSTALL.html
402
+ rm -f INSTALL.html INSTALL.xml
396
403
# single-page output
397
404
rm -f postgres.html postgres.txt
398
405
# print
399
406
rm -f *.rtf *.tex-ps *.tex-pdf *.dvi *.aux *.log *.ps *.pdf *.out *.fot
400
407
# index
401
408
rm -f HTML.index $(GENERATED_SGML)
402
409
# XSLT
403
- rm -f postgres.xml postgres.xmltmp htmlhelp.hhp toc.hhc index.hhk *.fo
410
+ rm -f postgres.xml *.tmp htmlhelp.hhp toc.hhc index.hhk *.fo
404
411
# EPUB
405
412
rm -f postgres.epub
406
413
# Texinfo
0 commit comments