]> granicus.if.org Git - postgresql/commitdiff
Install the SQL command man pages into a section appropriate for each
authorPeter Eisentraut <peter_e@gmx.net>
Wed, 29 Aug 2001 19:14:40 +0000 (19:14 +0000)
committerPeter Eisentraut <peter_e@gmx.net>
Wed, 29 Aug 2001 19:14:40 +0000 (19:14 +0000)
system.  Some systems did not understand the 'l' section, and in general
it wasn't entirely appropriate.

On SCO OpenServer, the man pages won't be installed at all until someone
figures out their man system.

29 files changed:
doc/FAQ_SCO
doc/Makefile
doc/src/Makefile
doc/src/sgml/Makefile
src/Makefile.global.in
src/backend/storage/lmgr/lock.c
src/interfaces/jdbc/org/postgresql/jdbc1/DatabaseMetaData.java
src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java
src/makefiles/Makefile.aix
src/makefiles/Makefile.beos
src/makefiles/Makefile.bsdi
src/makefiles/Makefile.darwin
src/makefiles/Makefile.dgux
src/makefiles/Makefile.freebsd
src/makefiles/Makefile.hpux
src/makefiles/Makefile.irix5
src/makefiles/Makefile.linux
src/makefiles/Makefile.netbsd
src/makefiles/Makefile.openbsd
src/makefiles/Makefile.osf
src/makefiles/Makefile.qnx4
src/makefiles/Makefile.sco
src/makefiles/Makefile.solaris
src/makefiles/Makefile.sunos4
src/makefiles/Makefile.svr4
src/makefiles/Makefile.ultrix4
src/makefiles/Makefile.univel
src/makefiles/Makefile.unixware
src/makefiles/Makefile.win

index 56a46f10445bef286031fc23e1bfe8ef5cc99393..6f7d2670a9fc0f5d23790762d30e6566210c7f59 100644 (file)
@@ -1,9 +1,9 @@
 ============================================================
-Frequently Asked Questions (FAQ) for PostgreSQL  V7.1
+Frequently Asked Questions (FAQ) for PostgreSQL 7.2
 SCO UnixWare and OpenServer specific
 to be read in conjunction with the installation instructions
 ============================================================
-last updated:           $Date: 2001/03/13 20:52:04 $
+last updated:           $Date: 2001/08/29 19:14:39 $
 
 current maintainer:     Billy G. Allie (Bill.Allie@mug.org)
 original author:        Andrew Merrill (andrew@compclass.com)
@@ -21,7 +21,7 @@ Topics:
 *) Readline
 *) Using the UDK on OpenServer
 *) Compiling PostgreSQL using the UDK
-*) Reading the PostgreSQL man pages on UnixWare
+*) Reading the PostgreSQL man pages
 
 
 ***************************************************************************
@@ -125,52 +125,15 @@ This compiler bug seems to be fixed at least in
 
 
 ***************************************************************************
-*) Reading the PostgreSQL man pages on UnixWare
+*) Reading the PostgreSQL man pages
 
-By default, the PostgreSQL man pages are installed into /usr/local/pgsql/man.
-By default, UnixWare does not look there for man pages, so you will not be
-able to read them.
-
-You need to make the following changes to access the PostgreSQL man pages
-from UnixWare.
-
-1) You need to modify the MANPATH variable in /etc/default/man.  I use:
+By default, the PostgreSQL man pages are installed into
+/usr/local/pgsql/man.  By default, UnixWare does not look there for
+man pages.  To be able to read them you need to modify the MANPATH
+variable in /etc/default/man.  I use:
 
        MANPATH=/usr/lib/scohelp/%L/man:/usr/dt/man:/usr/man:/usr/share/man:scohelp:/usr/local/man:/usr/local/pgsql/man
 
-2) Add a line that says '1sql' to /etc/default/manSection.
-
-3) The man pages for SQL commands are, by default, placed in section 'l'
-   (normally used for "l"ocal pages).  UnixWare does not support the 'l'
-   section.
-
-The solution I use is to move all these pages from section 'l' to a section
-named '1sql'.  To following KSH script will perform the move and change the
-section names in the man page:
-
-------------------------------8< CUT HERE >8------------------------------
-#!/bin/ksh
-cd /usr/local/pgsql/man
-mv man1 man.1
-mkdir man.1sql
-
-cd /usr/local/pgsql/man/manl
-for i in *.l
-do
-       sed -e '/^\.TH/s/"l"/"1sql"/'   \
-               -e 's/\\fR(l)/\\fR(1sql)/' $i >../man.1sql/${i%.l}.1sql
-done
-cd /usr/local/pgsql/man
-rm -rf manl
-/usr/ucb/catman -M /usr/local/pgsql/man 1
-/usr/ucb/catman -M /usr/local/pgsql/man 1sql
-------------------------------8< CUT HERE >8------------------------------
-
-After running this script, you can view the man pages using the 'man'
-command.  They will not be usable from the scohelp system.
-
-I am working on integrating the man pages into the scohelp system.  When I
-generate a PostgreSQL package for UnixWare 7.x, the man pages will be
-integrated into the scohelp system.
-
-I have not tried using the PostgreSQL man pages on OpenServer.  Volunteers??
+On OpenServer, some extra research needs to be invested to make the
+man pages usable, because the man system is a bit different from other
+platforms.  Currently, PostgreSQL will not install them at all.
index 233c6735506f5dcb497845bcddfd89fb66e43d6b..341f473d0dc815ba6fce8d10c0159b184866455d 100644 (file)
@@ -4,16 +4,17 @@
 #
 # Copyright (c) 1994, Regents of the University of California
 #
-# $Header: /cvsroot/pgsql/doc/Makefile,v 1.20 2000/12/26 20:47:07 petere Exp $
+# $Header: /cvsroot/pgsql/doc/Makefile,v 1.21 2001/08/29 19:14:39 petere Exp $
 #
 #----------------------------------------------------------------------------
 
-# This directory doesn't build anything, it is only responsible for
-# installing the documenation. It is invoked automatically by the
-# top-level makefile. The files to be installed are prepared specially
-# and are placed in this directory during distribution bundling. In
-# CVS-based trees these files don't exist, so we skip the installation
-# in that case.
+# This makefile is responsible for installing the documentation. The
+# files to be installed are prepared specially and are placed in this
+# directory during distribution bundling. In CVS-based trees these
+# files don't exist, so we skip the installation in that case.
+#
+# Before we install the man pages, we massage the section numbers to
+# follow the local conventions.
 #
 # To actually build the documenation, look into the src/ and src/sgml
 # subdirectories.
@@ -22,17 +23,47 @@ subdir = doc
 top_builddir = ..
 include $(top_builddir)/src/Makefile.global
 
+.NOTPARALLEL:
 
 ifneq ($(wildcard $(srcdir)/postgres.tar.gz),)
 found_html := yes
 endif
 
 ifneq ($(wildcard $(srcdir)/man.tar.gz),)
+# SCO OpenServer's man system is sufficiently different to not bother.
+ifneq ($(PORTNAME), sco)
 found_man := yes
 endif
+endif
+
+
+ifdef found_man
+ifndef sqlmansect
+sqlmansect = 7
+endif
+sqlmansectnum = $(shell expr X'$(sqlmansect)' : X'\([0-9]\)')
+
+all: man1/.timestamp man$(sqlmansectnum)/.timestamp
 
+man1/.timestamp man$(sqlmansect_dummy)/.timestamp: man.tar.gz
+       gzip -d -c $< | $(TAR) xf -
+       for file in man1/*.1; do \
+         mv $$file $$file.bak && \
+         sed -e 's/\\fR($(sqlmansect_dummy))/\\fR($(sqlmansectnum))/' $$file.bak >$$file && \
+         rm $$file.bak || exit; \
+       done
+       @echo timestamp >man1/.timestamp
+       @echo timestamp >man$(sqlmansect_dummy)/.timestamp
 
-all:
+man$(sqlmansectnum)/.timestamp: man$(sqlmansect_dummy)/.timestamp
+       $(mkinstalldirs) man$(sqlmansectnum)
+       for file in man$(sqlmansect_dummy)/*.$(sqlmansect_dummy); do \
+         sed -e '/^\.TH/s/"$(sqlmansect_dummy)"/"$(sqlmansect)"/'   \
+              -e 's/\\fR($(sqlmansect_dummy))/\\fR($(sqlmansectnum))/' \
+             $$file >man$(sqlmansectnum)/`basename $$file | sed 's/.$(sqlmansect_dummy)$$/.$(sqlmansect)/'` || exit; \
+       done
+       @echo timestamp >$@
+endif # found_man
 
 
 install: all installdirs
@@ -40,12 +71,19 @@ ifdef found_html
        gzip -d -c postgres.tar.gz | ( cd $(DESTDIR)$(docdir)/html && $(TAR) xf - )
 endif
 ifdef found_man
-       gzip -d -c man.tar.gz | ( cd $(DESTDIR)$(mandir) && $(TAR) xf - )
+       for file in man1/*.1 man$(sqlmansectnum)/*.$(sqlmansect) ; do \
+         $(INSTALL_DATA) $$file $(DESTDIR)$(mandir)/$$file || exit; \
+       done
 endif
 
 
 installdirs:
-       $(mkinstalldirs) $(DESTDIR)$(mandir) $(DESTDIR)$(docdir)/html
+ifdef found_html
+       $(mkinstalldirs) $(DESTDIR)$(docdir)/html
+endif
+ifdef found_man
+       $(mkinstalldirs) $(addprefix $(DESTDIR)$(mandir)/man, 1 $(sqlmansectnum))
+endif
 
 
 uninstall:
@@ -53,5 +91,11 @@ ifdef found_html
        -rm -f $(addprefix $(DESTDIR)$(docdir)/html/, $(shell gunzip -c $(srcdir)/postgres.tar.gz | tar tf -))
 endif
 ifdef found_man
-       -rm -f $(addprefix $(DESTDIR)$(mandir)/, $(shell gunzip -c $(srcdir)/man.tar.gz | tar tf -))
+       -rm -f $(addprefix $(DESTDIR)$(mandir)/, $(shell gunzip -c $(srcdir)/man.tar.gz | tar tf - | sed -e 's,man$(sqlmansect_dummy)/,man$(sqlmansectnum)/,' -e 's/.$(sqlmansect_dummy)$$/.$(sqlmansect)/'))
 endif
+
+
+clean:
+       rm -rf man1/ man$(sqlmansectnum)/ man$(sqlmansect_dummy)/
+
+distclean maintainer-clean: clean
index bb4f2352c46bb66688e5075c54694a36f811adba..6717f1f7727d7a00cf751d41233d417546fd16c3 100644 (file)
@@ -1,5 +1,5 @@
 # Postgres documentation makefile
-# $Header: /cvsroot/pgsql/doc/src/Makefile,v 1.18 2001/03/27 16:34:14 momjian Exp $
+# $Header: /cvsroot/pgsql/doc/src/Makefile,v 1.19 2001/08/29 19:14:39 petere Exp $
 
 subdir = doc/src
 top_builddir = ../..
@@ -60,7 +60,7 @@ postgres.tar:
 
 man.tar:
        $(MAKE) -C sgml man
-       $(TAR) -cf $@ -C sgml man1 manl
+       $(TAR) -cf $@ -C sgml man1 man$(sqlmansect_dummy)
 
 # Generic production rules
 
index e60ef8156c73e5d15acfc68bbe34f7a6d12ce7fe..293fb6e760641554795d59ebb71a33cc82756bd6 100644 (file)
@@ -8,7 +8,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.37 2001/05/12 22:51:34 petere Exp $
+#    $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.38 2001/08/29 19:14:39 petere Exp $
 #
 #----------------------------------------------------------------------------
 
@@ -60,7 +60,7 @@ CATALOG = $(DOCBOOKSTYLE)/catalog
 
 .PHONY: man
 
-DEFAULTSECTION := l
+DEFAULTSECTION := $(sqlmansect_dummy)
 
 man: $(ALLSGML)
        $(NSGMLS) $(NSGMLS_FLAGS) $(srcdir)/book-decl.sgml $(srcdir)/reference.sgml \
index dc54dcd1e6667d33b0ed6f94a9e8859d7280aa41..9a1aa8c5386f957265f2096cf94ffd4ebf71a6fc 100644 (file)
@@ -1,5 +1,5 @@
 # -*-makefile-*-
-# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.135 2001/08/28 14:20:26 petere Exp $
+# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.136 2001/08/29 19:14:39 petere Exp $
 
 #------------------------------------------------------------------------------
 # All PostgreSQL makefiles include this file and use the variables it sets,
@@ -88,6 +88,7 @@ includedir_server = $(pkgincludedir)/server
 includedir_internal = $(pkgincludedir)/internal
 
 mandir := @mandir@
+sqlmansect_dummy = l
 
 docdir := @docdir@
 ifeq "$(findstring pgsql, $(docdir))" ""
index 7816a6c96894f11138c780863cc01780cc8b12ba..82679eb65cb0b3b7ba2aee482beb190627e7e778 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.92 2001/08/23 23:06:38 tgl Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.93 2001/08/29 19:14:39 petere Exp $
  *
  * NOTES
  *       Outside modules can create a lock table and acquire/release
@@ -65,8 +65,6 @@ static char *lock_mode_names[] =
        "AccessExclusiveLock"
 };
 
-static char *DeadLockMessage = "Deadlock detected.\n\tSee the lock(l) manual page for a possible cause.";
-
 
 #ifdef LOCK_DEBUG
 
@@ -953,7 +951,7 @@ WaitOnLock(LOCKMETHOD lockmethod, LOCKMODE lockmode,
                 */
                LOCK_PRINT("WaitOnLock: aborting on lock", lock, lockmode);
                SpinRelease(lockMethodTable->ctl->masterLock);
-               elog(ERROR, DeadLockMessage);
+               elog(ERROR, "deadlock detected");
                /* not reached */
        }
 
index a87c34e771f1f94fb014ae5b921fc5b78aaff92a..e1187b30947b97157acb36e58125e94685a7b181 100644 (file)
@@ -1196,7 +1196,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
 
   /**
    * What is the maximum number of columns in a table? From the
-   * create_table(l) manual page...
+   * CREATE TABLE reference page...
    *
    * <p>"The new class is created as a heap with no initial data.  A
    * class can have no more than 1600 attributes (realistically,
index bc47bbde9c1743d98eb647ac1f32b4d3d7cce072..6acfec1421d2a2bcb7fe9d27e7dcb0c1b8c61e35 100644 (file)
@@ -1196,7 +1196,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
 
   /**
    * What is the maximum number of columns in a table? From the
-   * create_table(l) manual page...
+   * CREATE TABLE reference page...
    *
    * <p>"The new class is created as a heap with no initial data.  A
    * class can have no more than 1600 attributes (realistically,
index a9ba100305c4dda7988dcb4f5075fe24b93c17da..f500a5f09b8dc08f03bd848cf9850615a7df789b 100644 (file)
@@ -43,3 +43,5 @@ endif
 %$(DLSUFFIX): %.o %$(EXPSUFF)
        @echo Making shared library $@ from $*.o, $*$(EXPSUFF) and postgres.imp
        $(CC) -Wl,-H512 -Wl,-bM:SRE -Wl,-bI:$(top_builddir)/src/backend/$(POSTGRES_IMP) -Wl,-bE:$*$(EXPSUFF) -o $@ $*.o $(LDFLAGS) $(LIBS) $(LDFLAGS_SL)
+
+sqlmansect = 7
index fa26c9935428b15f09260c3445352f4e8a1b58b6..7c79bcecd9446c326ffbd0f13ea0a3180e791e36 100644 (file)
@@ -11,3 +11,5 @@ CFLAGS_SL = -fpic -DPIC
 %.so: %.o
        ln -fs $(top_srcdir)/src/backend/postgres _APP_
        $(CC) -nostart -Xlinker -soname=$@ -o $@ _APP_ $<
+
+sqlmansect = 7
index 901e210fbb63ca36fb4611ea9c225bd72047687d..95eb123841f160e2ec12be052bbc08c705e3b61c 100644 (file)
@@ -22,3 +22,5 @@ endif
 
 %.so: %.o
        $(CC) -shared -o $@ $<
+
+sqlmansect = 7
index cfeba7f922f2955579cb665fc6570844fd904b21..b6619165b0c453b373536a8456f597d6171fc3b4 100644 (file)
@@ -6,3 +6,5 @@ CFLAGS_SL = -bundle -undefined suppress
  
 %.so: %.o
        $(CC) $(CFLAGS) $(CFLAGS_SL) -o $@ $<
+
+sqlmansect = 7
index c88ee14e0eaf72b90a7108c4ef2310b97bf2bb2c..f9519632a20c884178c3cebcf1ddfc45b5e137cc 100644 (file)
@@ -4,3 +4,5 @@ CFLAGS_SL = -fpic
 
 %.so: %.o
        $(CC) -shared -o $@ $<
+
+sqlmansect = 5
index 9f270c37fad62726aab19bce91674d5373b074dd..90543b7016a3f4184215f84d0f22010ec5a00466 100644 (file)
@@ -21,3 +21,5 @@ else
        @rm -f $@
        $(LD) -x -Bshareable -Bforcearchive -o $@ $@.pic
 endif
+
+sqlmansect = 7
index 1ed5130af08cd3f14f6121581d0ae46b6cd8ad4b..cfdbee114b9b282ac1b036bed096094ba5482792 100644 (file)
@@ -52,3 +52,5 @@ endif
 # shlib ... should go away, since this is not really enough knowledge)
 %.sl: %.o
        $(LD) -b -o $@ $<
+
+sqlmansect = 5
index d90fcd9a6ebf2068c49b72a3c5f7eeed66b7c33a..4062161d9ef58587b5a68a0683e656ddf8db705d 100644 (file)
@@ -16,3 +16,5 @@ ifneq ($(GCC), yes)
 CFLAGS += -woff 1164,1171,1185,1195,1552
 endif
 LDFLAGS += -Wl,-woff,15 -Wl,-woff,84
+
+sqlmansect = 5sql
index 31277151c96c0acb62a79d6af9a6e0a6c23474d5..2b204f9d853b72f600d5a39d95558f61849334ab 100644 (file)
@@ -8,3 +8,5 @@ CFLAGS_SL = -fpic
 
 %.so: %.o
        $(CC) -shared -o $@ $<
+
+sqlmansect = 7
index bcba61732fbc68effe9b573e21e52ec427d7e6fe..59ab7a791fd42438459919c5673516513f3403d9 100644 (file)
@@ -24,3 +24,5 @@ else
        $(LD) -x -Bshareable -Bforcearchive \
          -o $@ $@.pic
 endif
+
+sqlmansect = 7
index fbcc2e2e4bd7cb6979596ec6b74f9c1097d547b8..3709d24bdc28ef8819f4934abf5fb8fb040e9886 100644 (file)
@@ -22,3 +22,5 @@ else
        $(LD) -x -Bshareable -Bforcearchive \
          -o $@ $@.pic
 endif
+
+sqlmansect = 7
index 2bf0cfe249ec699cc347e36246128f61240d45bd..4ee46ccd756b19cefc8692f75a937bdbb1591317 100644 (file)
@@ -5,3 +5,5 @@ rpath = -rpath $(libdir)
 
 %.so: %.o
        $(LD) -shared -expect_unresolved '*' -o $@ $<
+
+sqlmansect = 5
index 2fb9d7bd193cdeb6e87b4d9620500a43eece5c75..23364955ed2fe7b91628919b68f7061adf309520 100644 (file)
@@ -15,3 +15,5 @@ CFLAGS_SL =
 
 override CXXFLAGS +=-I/usr/local/include/g++
 override CFLAGS +=-I/usr/local/include
+
+sqlmansect = 7
index a2fedb22f0d6d5069c4f8a4ea2f219a47e5baff8..4cd2bcfe2f3104f46b7355bb48ebd74a4fc5afa2 100644 (file)
@@ -16,3 +16,4 @@ endif
 
 %.so: %.o
        $(LD) -G -Bdynamic -o $@ $<
+sqlmansect = 7
index 56fb5c5f0582c998165a1a5f25db816bd97cc116..4425bc45b350a1382ac68bd42bba4899ec41fe69 100644 (file)
@@ -1,4 +1,4 @@
-# $Header: /cvsroot/pgsql/src/makefiles/Makefile.solaris,v 1.6 2000/12/16 18:14:25 petere Exp $
+# $Header: /cvsroot/pgsql/src/makefiles/Makefile.solaris,v 1.7 2001/08/29 19:14:40 petere Exp $
 
 AROPT = crs
 
@@ -24,3 +24,5 @@ endif
 
 %.so: %.o
        $(LD) -G -Bdynamic -o $@ $<
+
+sqlmansect = 5sql
index c45f44d0998f6448da0312c1a916990e6f1f16be..f9e9fc63d90c1133ab39e97f3f4d57e49738bc70 100644 (file)
@@ -15,3 +15,4 @@ endif
 %.so: %.o
        $(LD) -assert pure-text -Bdynamic -o $@ $<
 
+sqlmansect = 7
index 9704f1a1d647550c5cdeb3b4d71beb873f8b41ea..7a01c5c944e4f456c770bcda0ae428d31742b1e6 100644 (file)
@@ -10,3 +10,5 @@ CFLAGS_SL =
 
 %.so: %.o
        $(LD) -G -Bdynamic -o $@ $<
+
+sqlmansect = 5
index 1c03737756fd6c887a1972bd320353e3c82100cd..e9acbc8d46230af208e93f40a49316e9ddfc3761 100644 (file)
@@ -8,3 +8,5 @@ CFLAGS_SL = -G 0
 
 %.so: %.c
        $(CC) -c -G 0 $(CPPFLAGS) $(CFLAGS) -o $@ $<
+
+sqlmansect = 7
index f91cf357e7392261c98100044321777f4eab9842..41e64616ef2b5fcded1656ffabf1ae99e15cd927 100644 (file)
@@ -6,4 +6,4 @@ CFLAGS_SL = -K PIC
 %.so: %.o
        $(LD) -G -Bdynamic -o $@ $<
 
-INSTALL= /usr/ucb/install
+sqlmansect = 5
index bc2ddcad36d9b88e9a653fb13459615665ea33b7..0a437c9b0c38378a145740a1bbbe578b6410124d 100644 (file)
@@ -19,3 +19,5 @@ endif
 
 %.so: %.o
        $(LD) -G -Bdynamic -o $@ $<
+
+sqlmansect = 5sql
index 7fce66b1acef95eba0b0c86a8c60a55eaa432574..cca9bcbbe0fe5a02ffd73979630aad4c689d0fba 100644 (file)
@@ -1,4 +1,4 @@
-# $Header: /cvsroot/pgsql/src/makefiles/Attic/Makefile.win,v 1.13 2001/05/25 15:48:33 momjian Exp $
+# $Header: /cvsroot/pgsql/src/makefiles/Attic/Makefile.win,v 1.14 2001/08/29 19:14:40 petere Exp $
 LDFLAGS+= -g
 DLLTOOL= dlltool
 DLLWRAP= dllwrap
@@ -33,3 +33,5 @@ override CPPFLAGS+= -DUSE_DL_IMPORT
 endif
 
 override javadir := '$(shell cygpath -w $(javadir))'
+
+sqlmansect = 7