88#
99#
1010# IDENTIFICATION
11- # $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.8 1999/07 /0617:19:41 thomas Exp $
11+ # $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.9 1999/08 /0613:46:17 thomas Exp $
1212#
1313# ----------------------------------------------------------------------------
1414
1515PGDOCS = ../..
1616SRCDIR = ../../../src
17- D2MDIR = ../docbook2man
1817
19- # This is where the default stylesheets appear on my system.
18+ # This is where the default stylesheets appear on mylinux system.
2019# Probably no need to change this; rather, put definitions
2120# for HSTYLE and PSTYLE and/or for HDSL and PDSL
2221# in Makefile.custom in your code src directory.
23-
2422# HSTYLE=/usr/lib/sgml/stylesheets/nwalsh-modular/html
2523# PSTYLE=/usr/lib/sgml/stylesheets/nwalsh-modular/print
24+ # This is where the production stylesheets appear on postgresql.org
2625
27- HSTYLE =/opt/sgml/current /docbook/html
28- PSTYLE =/opt/sgml/current /docbook/print
26+ HSTYLE = /home/users/t/thomas/db118.d /docbook/html
27+ PSTYLE = /home/users/t/thomas/db118.d /docbook/print
2928
3029HDSL =$(HSTYLE ) /docbook.dsl
3130PDSL =$(PSTYLE ) /docbook.dsl
@@ -39,14 +38,20 @@ DBOPTS= -D ref -D ../graphics
3938# as in v6.3 documentation. Yuck.
4039DBOPTS+ = -V %use-id-as-filename%
4140
41+ # docbook2man generates man pages from docbook refentry source code.
42+ # This is where the (patched) docbook2man perl scripts reside on hub.org.
43+
44+ D2MDIR = /home/users/t/thomas/d2x/docbook2man
45+ D2MSCRIPT =$(D2MDIR ) /docbook2man-spec.pl
46+
4247TAR = tar
4348
4449# Pick up Makefile.global from the source area
4550# This is the only resource from the code source area and is optional.
4651# Actually, we want this to get Makefile.custom - thomas 1998-03-01
4752
48- ifneq ($(wildcard $(SRCDIR ) /Makefile.global) , )
49- include $(SRCDIR ) /Makefile.global
53+ ifneq ($(wildcard $(SRCDIR ) /Makefile.global) ,)
54+ include $(SRCDIR ) /Makefile.global
5055endif
5156
5257# Hmm, made this optional but jade _really_ doesn't like them missing
@@ -58,16 +63,23 @@ ifneq ($(PDSL), )
5863PRINTOPTS = -d$(PDSL )
5964endif
6065
66+ vpath % .sgml ./ref
67+
6168MANSOURCES =$(wildcard ref/* .sgml)
6269
6370APPLICATIONS = createdb.sgml createuser.sgml\
71+ createlang.sgml\
6472destroydb.sgml destroyuser.sgml\
73+ destroylang.sgml\
6574initdb.sgml initlocation.sgml\
75+ ipcclean.sgml\
6676pg_dump.sgml\
6777pg_dumpall.sgml\
6878pg_upgrade.sgml\
6979pgaccess-ref.sgml\
7080pgadmin-ref.sgml\
81+ pgtclsh.sgml\
82+ pgtksh.sgml\
7183postgres-ref.sgml\
7284postmaster.sgml\
7385psql-ref.sgml\
@@ -93,40 +105,42 @@ COMMANDS= abort.sgml alter_table.sgml alter_user.sgml \
93105
94106FUNCTIONS = current_date.sgml current_time.sgml current_timestamp.sgml current_user.sgml
95107
96- APPSOURCES =$(addprefix ref/,$(APPLICATIONS ) )
97- SQLSOURCES =$(addprefix ref/,$(COMMANDS ) )
98- APPTARGETS =$(APPLICATIONS:.sgml=.1 )
99- SQLTARGETS =$(COMMANDS:.sgml=.l )
108+ # APPSOURCES= $(addprefix ref/, $(APPLICATIONS))
109+ # SQLSOURCES= $(addprefix ref/, $(COMMANDS))
110+ APPSOURCES =$(APPLICATIONS )
111+ SQLSOURCES =$(COMMANDS )
112+ XAPPTARGETS =$(APPLICATIONS:.sgml=.1 )
113+ APPTARGETS =$(XAPPTARGETS:-ref.1=.1 )
114+ XSQLTARGETS =$(COMMANDS:.sgml=.l )
115+ SQLTARGETS =$(XSQLTARGETS:-ref.l=.l )
100116
101117.PRECIOUS : postgres.tex postgres.dvi
102118.PHONY : install all clean distclean
103119
104120install ::
105- # $(MAKE) all
106- # (mv -rf *.gz ..)
107121
108122all ::
109123
110- # man:: .manlist
111- # for f in `cat .manlist` ; do \
112- #nsgmls $f | sgmlspl ../docbook2man/docbook2man-spec.pl --lowercase; \
113- #done
114- #
115- # .manlist: $(MANSOURCES)
116- # (grep -iE '<refentry([ ]|>)' $(MANSOURCES) | cut -f 1 -d : | sort | uniq) > .manlist
124+ man :
125+ $( MAKE ) man1 manl
126+ ( $( RM ) -r * .1 * .l man1 manl)
127+ $( MAKE ) man1 manl
128+
129+ manpage.refs :
130+ $( MAKE ) man
117131
118- man1 :$(APPTARGETS )
132+ man1 :$(APPTARGETS ) manpage.refs
119133$(RM ) -rf man1
120134if [! -d man1 ]; then mkdir man1; fi
121- mv * .1 man1/
135+ cp * .1 man1/
122136
123- manl :$(SQLTARGETS )
137+ manl :$(SQLTARGETS ) manpage.refs
124138$(RM ) -rf manl/*
125139if [! -d manl ]; then mkdir manl; fi
126- mv * .l manl/
140+ cp * .l manl/
127141
128142clean ::
129- (rm -rf HTML.manifest* .html* .htm man1 manl manpage* )
143+ (rm -rf HTML.manifest* .html* .htm* .1 * .l man1 manl manpage* )
130144
131145distclean ::
132146$(MAKE ) clean
@@ -135,11 +149,14 @@ distclean::
135149# Generic production rules
136150#
137151
138- % .1 : ref/% .sgml
139- nsgmls$< | sgmlspl$(D2MDIR ) /docbook2man-spec.pl --defsection 1
152+ % .1 :% -ref.sgml
153+ nsgmls$< | sgmlspl$(D2MSCRIPT ) --lowercase --section 1
154+
155+ % .1 :% .sgml
156+ nsgmls$< | sgmlspl$(D2MSCRIPT ) --lowercase --section 1
140157
141- % .l :ref/ % .sgml
142- nsgmls$< | sgmlspl$(D2MDIR ) /docbook2man-spec.pl --defsection l
158+ % .l :% .sgml
159+ nsgmls$< | sgmlspl$(D2MSCRIPT ) --lowercase --section l
143160
144161# HTML
145162# Include some softlinks to the generic default file names