aboutsummaryrefslogtreecommitdiff
path: root/doc/src/sgml/generate_history.pl
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2014-02-10 20:48:04 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2014-02-10 20:48:04 -0500
commit2895415205d86cc7ab55acab5f90fd70a7c68f3c (patch)
treea27852acace1392b24f993978b787235abbe79ee /doc/src/sgml/generate_history.pl
parentd699ba41349e4ef397222a7223606fa03f4c4870 (diff)
downloadpostgresql-2895415205d86cc7ab55acab5f90fd70a7c68f3c.tar.gz
postgresql-2895415205d86cc7ab55acab5f90fd70a7c68f3c.zip
Don't generate plain-text HISTORY and src/test/regress/README anymore.
Providing this information as plain text was doubtless worth the trouble ten years ago, but it seems likely that hardly anyone reads it in this format anymore. And the effort required to maintain these files (in the form of extra-complex markup rules in the relevant parts of the SGML documentation) is significant. So, let's stop doing that and rely solely on the other documentation formats. Per discussion, the plain-text INSTALL instructions might still be worth their keep, so we continue to generate that file. Rather than remove HISTORY and src/test/regress/README from distribution tarballs entirely, replace them with simple stub files that tell the reader where to find the relevant documentation. This is mainly to avoid possibly breaking packaging recipes that expect these files to exist. Back-patch to all supported branches, because simplifying the markup requirements for release notes won't help much unless we do it in all branches.
Diffstat (limited to 'doc/src/sgml/generate_history.pl')
-rw-r--r--doc/src/sgml/generate_history.pl65
1 files changed, 0 insertions, 65 deletions
diff --git a/doc/src/sgml/generate_history.pl b/doc/src/sgml/generate_history.pl
deleted file mode 100644
index 1d90c676c73..00000000000
--- a/doc/src/sgml/generate_history.pl
+++ /dev/null
@@ -1,65 +0,0 @@
-#! /usr/bin/perl -w
-
-# generate_history.pl -- flatten release notes for use as HISTORY file
-#
-# Usage: generate_history.pl srcdir release.sgml >output.sgml
-#
-# The main point of this script is to strip out <link> references, which
-# generally point into the rest of the documentation and so can't be used
-# in a standalone build of the release notes. To make sure this is done
-# everywhere, we have to fold in the sub-files of the release notes.
-#
-# doc/src/sgml/generate_history.pl
-
-use strict;
-
-my $srcdir = shift;
-die "$0: missing required argument: srcdir\n" if !defined($srcdir);
-my $infile = shift;
-die "$0: missing required argument: inputfile\n" if !defined($infile);
-
-# Emit DOCTYPE header so that the output is a self-contained SGML document
-print "<!DOCTYPE appendix PUBLIC \"-//OASIS//DTD DocBook V4.2//EN\">\n";
-
-process_file($infile);
-
-exit 0;
-
-sub process_file
-{
- my $filename = shift;
-
- local *FILE; # need a local filehandle so we can recurse
-
- my $f = $srcdir . '/' . $filename;
- open(FILE, $f) || die "could not read $f: $!\n";
-
- while (<FILE>)
- {
-
- # Recursively expand sub-files of the release notes
- if (m/^&(release-.*);$/)
- {
- process_file($1 . ".sgml");
- next;
- }
-
- # Remove <link ...> tags, which might span multiple lines
- while (m/<link/)
- {
- if (s/<link\s+linkend[^>]*>//)
- {
- next;
- }
-
- # incomplete tag, so slurp another line
- $_ .= <FILE>;
- }
-
- # Remove </link> too
- s|</link>||g;
-
- print;
- }
- close(FILE);
-}