aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/create_help.pl
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/psql/create_help.pl')
-rw-r--r--src/bin/psql/create_help.pl36
1 files changed, 23 insertions, 13 deletions
diff --git a/src/bin/psql/create_help.pl b/src/bin/psql/create_help.pl
index c5b0d868065..f802d5ed791 100644
--- a/src/bin/psql/create_help.pl
+++ b/src/bin/psql/create_help.pl
@@ -1,18 +1,22 @@
-#!/usr/bin/perl
+#! /usr/bin/perl
+#################################################################
+# create_help.pl -- converts SGML docs to internal psql help
#
-# This script automatically generates the help on SQL in psql from the
-# SGML docs. So far the format of the docs was consistent enough that
-# this worked, but this here is my no means an SGML parser.
+# Copyright 2000 by PostgreSQL Global Development Group
#
-# It might be a good idea that this is just done once before distribution
-# so people that don't have the docs or have slightly messed up docs or
-# don't have perl, etc. won't have to bother.
+# $Header: /cvsroot/pgsql/src/bin/psql/create_help.pl,v 1.3 2000/01/29 16:58:48 petere Exp $
+#################################################################
+
+#
+# This script automatically generates the help on SQL in psql from
+# the SGML docs. So far the format of the docs was consistent
+# enough that this worked, but this here is my no means an SGML
+# parser.
#
# Call: perl create_help.pl sql_help.h
-# (Do not rely on this script to be executable.)
-# The name of the header file doesn't matter to this script, but it sure
-# does matter to the rest of the source.
+# The name of the header file doesn't matter to this script, but it
+# sure does matter to the rest of the source.
#
# A rule for this is also in the psql makefile.
#
@@ -29,9 +33,15 @@ open OUT, ">$outputfile" or die "Couldn't open output file '$outputfile': $!\n";
print OUT
"/*
- * This file is automatically generated from the SGML documentation.
- * Direct changes here will be overwritten.
+ * *** Do not change this file directly. Changes will be overwritten. ***
+ *
+ * This file was generated by
+ * $^X $0 $outputfile
+ * from the DocBook documentation in
+ * $docdir
+ *
*/
+
#ifndef $define
#define $define
@@ -76,7 +86,7 @@ foreach $file (sort readdir DIR) {
print OUT " { \"$cmdname\",\n \"$cmddesc\",\n \"$cmdsynopsis\" },\n\n";
}
else {
- print STDERR "Couldn't parse file '$file'. (N='$cmdname' D='$cmddesc')\n";
+ print STDERR "$0: parsing file '$file' failed at or near line $. (N='$cmdname' D='$cmddesc')\n";
}
}