Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 777a4f7

Browse files
author
Thomas G. Lockhart
committed
Remove explicit references to ref/ path in file names; use vpath instead.
Fix rules for man pages to ensure double-pass to get cross references. Add a few new man pages.
1 parent 4f1766f commit 777a4f7

File tree

1 file changed

+47
-30
lines changed

1 file changed

+47
-30
lines changed

doc/src/sgml/Makefile

Lines changed: 47 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,23 @@
88
#
99
#
1010
# IDENTIFICATION
11-
# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.8 1999/07/06 17:19:41 thomas Exp $
11+
# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.9 1999/08/06 13:46:17 thomas Exp $
1212
#
1313
#----------------------------------------------------------------------------
1414

1515
PGDOCS= ../..
1616
SRCDIR= ../../../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 my linux 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

3029
HDSL=$(HSTYLE)/docbook.dsl
3130
PDSL=$(PSTYLE)/docbook.dsl
@@ -39,14 +38,20 @@ DBOPTS= -D ref -D ../graphics
3938
# as in v6.3 documentation. Yuck.
4039
DBOPTS+= -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+
4247
TAR= 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
5055
endif
5156

5257
# Hmm, made this optional but jade _really_ doesn't like them missing
@@ -58,16 +63,23 @@ ifneq ($(PDSL), )
5863
PRINTOPTS= -d $(PDSL)
5964
endif
6065

66+
vpath %.sgml ./ref
67+
6168
MANSOURCES= $(wildcard ref/*.sgml)
6269

6370
APPLICATIONS= createdb.sgml createuser.sgml \
71+
createlang.sgml \
6472
destroydb.sgml destroyuser.sgml \
73+
destroylang.sgml \
6574
initdb.sgml initlocation.sgml \
75+
ipcclean.sgml \
6676
pg_dump.sgml \
6777
pg_dumpall.sgml \
6878
pg_upgrade.sgml \
6979
pgaccess-ref.sgml \
7080
pgadmin-ref.sgml \
81+
pgtclsh.sgml \
82+
pgtksh.sgml \
7183
postgres-ref.sgml \
7284
postmaster.sgml \
7385
psql-ref.sgml \
@@ -93,40 +105,42 @@ COMMANDS= abort.sgml alter_table.sgml alter_user.sgml \
93105

94106
FUNCTIONS= 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

104120
install::
105-
# $(MAKE) all
106-
# (mv -rf *.gz ..)
107121

108122
all::
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
120134
if [ ! -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/*
125139
if [ ! -d manl ]; then mkdir manl; fi
126-
mv *.l manl/
140+
cp *.l manl/
127141

128142
clean::
129-
(rm -rf HTML.manifest *.html *.htm man1 manl manpage*)
143+
(rm -rf HTML.manifest *.html *.htm *.1 *.l man1 manl manpage*)
130144

131145
distclean::
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

0 commit comments

Comments
 (0)