mirror of
https://github.com/postgres/postgres.git
synced 2025-12-24 06:01:07 +03:00
Install the SQL command man pages into a section appropriate for each
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.
This commit is contained in:
59
doc/FAQ_SCO
59
doc/FAQ_SCO
@@ -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.
|
||||
|
||||
66
doc/Makefile
66
doc/Makefile
@@ -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
|
||||
|
||||
|
||||
all:
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user