Skip to content

Commit 008fad5

Browse files
committed
Split the release notes into a separate file for each (active) major branch,
as per my recent proposal. release.sgml itself is now just a stub that should change rarely; ideally, only once per major release to add a new include line. Most editing work will occur in the release-N.N.sgml files. To update a back branch for a minor release, just copy the appropriate release-N.N.sgml file(s) into the back branch. This commit doesn't change the end-product documentation at all, only the source layout. However, it makes it easy to start omitting ancient information from newer branches' documentation, should we ever decide to do that.
1 parent c91bf01 commit 008fad5

File tree

11 files changed

+32090
-31998
lines changed

11 files changed

+32090
-31998
lines changed

doc/src/sgml/Makefile

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# PostgreSQL documentation makefile
44
#
5-
# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.114 2008/12/11 07:34:07 petere Exp $
5+
# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.115 2009/05/02 20:17:19 tgl Exp $
66
#
77
#----------------------------------------------------------------------------
88

@@ -173,13 +173,13 @@ JADE.tex.call = $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) $(CATALOG) -d $(srcdir)/styl
173173
# PostScript from TeX
174174
postgres.ps:
175175
$(error Invalid target; use postgres-A4.ps or postgres-US.ps as targets)
176-
176+
177177
%.ps: %.dvi
178178
dvips -o $@ $<
179179

180180
postgres.pdf:
181181
$(error Invalid target; use postgres-A4.pdf or postgres-US.pdf as targets)
182-
182+
183183
%.pdf: %.tex-pdf
184184
@rm -f $*.aux $*.log $*.out
185185
# multiple runs are necessary to create proper intra-document links
@@ -208,12 +208,8 @@ INSTALL HISTORY regress_README: % : %.html
208208
INSTALL.html: standalone-install.sgml installation.sgml version.sgml
209209
$(JADE.text) -V nochunks standalone-install.sgml installation.sgml >$@
210210

211-
# remove links to main documentation
212-
HISTORY.html: release.sgml
213-
( echo '<!doctype appendix PUBLIC "-//OASIS//DTD DocBook V4.2//EN">'; \
214-
cat $< ) | \
215-
$(PERL) -p -0 -e 's/<link\s+linkend[^>]*>//g' | \
216-
$(PERL) -p -e 's/<\/link>//g' >tempfile_HISTORY.sgml
211+
HISTORY.html: generate_history.pl $(wildcard $(srcdir)/release*.sgml)
212+
$(PERL) $< "$(srcdir)" release.sgml >tempfile_HISTORY.sgml
217213
$(JADE.text) -V nochunks tempfile_HISTORY.sgml >$@
218214
rm tempfile_HISTORY.sgml
219215

doc/src/sgml/filelist.sgml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/filelist.sgml,v 1.60 2009/03/25 23:20:01 tgl Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/filelist.sgml,v 1.61 2009/05/02 20:17:19 tgl Exp $ -->
22

33
<!entity history SYSTEM "history.sgml">
44
<!entity info SYSTEM "info.sgml">
@@ -138,7 +138,16 @@
138138
<!entity errcodes SYSTEM "errcodes.sgml">
139139
<!entity features SYSTEM "features.sgml">
140140
<!entity keywords SYSTEM "keywords.sgml">
141+
141142
<!entity release SYSTEM "release.sgml">
143+
<!entity release-8.4 SYSTEM "release-8.4.sgml">
144+
<!entity release-8.3 SYSTEM "release-8.3.sgml">
145+
<!entity release-8.2 SYSTEM "release-8.2.sgml">
146+
<!entity release-8.1 SYSTEM "release-8.1.sgml">
147+
<!entity release-8.0 SYSTEM "release-8.0.sgml">
148+
<!entity release-7.4 SYSTEM "release-7.4.sgml">
149+
<!entity release-old SYSTEM "release-old.sgml">
150+
142151
<!entity acronyms SYSTEM "acronyms.sgml">
143152

144153
<!entity features-supported SYSTEM "features-supported.sgml">

doc/src/sgml/generate_history.pl

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#! /usr/bin/perl -w
2+
3+
# generate_history.pl -- flatten release notes for use as HISTORY file
4+
#
5+
# Usage: generate_history.pl srcdir release.sgml >output.sgml
6+
#
7+
# The main point of this script is to strip out <link> references, which
8+
# generally point into the rest of the documentation and so can't be used
9+
# in a standalone build of the release notes. To make sure this is done
10+
# everywhere, we have to fold in the sub-files of the release notes.
11+
#
12+
# $PostgreSQL: pgsql/doc/src/sgml/generate_history.pl,v 1.1 2009/05/02 20:17:19 tgl Exp $
13+
14+
use strict;
15+
16+
my($srcdir) = shift;
17+
defined($srcdir) || die "$0: missing required argument: srcdir\n";
18+
my($infile) = shift;
19+
defined($infile) || die "$0: missing required argument: inputfile\n";
20+
21+
# Emit DOCTYPE header so that the output is a self-contained SGML document
22+
print "<!DOCTYPE appendix PUBLIC \"-//OASIS//DTD DocBook V4.2//EN\">\n";
23+
24+
process_file($infile);
25+
26+
exit 0;
27+
28+
sub process_file {
29+
my($filename) = @_;
30+
31+
local *FILE; # need a local filehandle so we can recurse
32+
33+
my($f) = $srcdir . '/' . $filename;
34+
open(FILE, $f) || die "could not read $f: $!\n";
35+
36+
while (<FILE>) {
37+
# Recursively expand sub-files of the release notes
38+
if (m/^&(release-.*);$/) {
39+
process_file($1 . ".sgml");
40+
next;
41+
}
42+
43+
# Remove <link ...> tags, which might span multiple lines
44+
while (m/<link/) {
45+
if (s/<link\s+linkend[^>]*>//) {
46+
next;
47+
}
48+
# incomplete tag, so slurp another line
49+
$_ .= <FILE>;
50+
}
51+
52+
# Remove </link> too
53+
s|</link>||g;
54+
55+
print;
56+
}
57+
close(FILE);
58+
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy