Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 87698ff

Browse files
committed
Extend man page installation hackery so that the man page section is also
fixed up in the .so links.
1 parent c79b450 commit 87698ff

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

doc/Makefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 1994, Regents of the University of California
66
#
7-
# $PostgreSQL: pgsql/doc/Makefile,v 1.33 2009/06/18 15:10:35 petere Exp $
7+
# $PostgreSQL: pgsql/doc/Makefile,v 1.34 2009/06/19 19:15:13 petere Exp $
88
#
99
#----------------------------------------------------------------------------
1010

@@ -43,6 +43,10 @@ sqlmansect = 7
4343
endif
4444
sqlmansectnum = $(shell expr X'$(sqlmansect)' : X'\([0-9]\)')
4545

46+
fix_sqlmansectnum = sed -e '/^\.TH/s/"7"/"$(sqlmansect)"/' \
47+
-e 's/\\fR(7)/\\fR($(sqlmansectnum))/g' \
48+
-e '1s/^\.so man7/.so man$(sqlmansectnum)/g;1s/^\(\.so.*\)\.7$$/\1.$(sqlmansect)/g'
49+
4650
all: man1/.timestamp man$(sqlmansectnum)/.timestamp
4751

4852
man1/.timestamp: man7/.timestamp
@@ -53,7 +57,7 @@ man7/.timestamp: man.tar.gz
5357
ifneq ($(sqlmansectnum),7)
5458
for file in man1/*.1; do \
5559
mv $$file $$file.bak && \
56-
sed -e 's/\\fR(7)/\\fR($(sqlmansectnum))/g' $$file.bak >$$file && \
60+
$(fix_sqlmansectnum) $$file.bak >$$file && \
5761
rm -f $$file.bak || exit; \
5862
done
5963
endif
@@ -63,9 +67,7 @@ ifneq ($(sqlmansectnum),7)
6367
man$(sqlmansectnum)/.timestamp: man7/.timestamp
6468
$(mkinstalldirs) man$(sqlmansectnum)
6569
for file in man7/*.7; do \
66-
sed -e '/^\.TH/s/"7"/"$(sqlmansect)"/' \
67-
-e 's/\\fR(7)/\\fR($(sqlmansectnum))/g' \
68-
$$file >man$(sqlmansectnum)/`basename $$file | sed 's/.7$$/.$(sqlmansect)/'` || exit; \
70+
$(fix_sqlmansectnum) $$file >man$(sqlmansectnum)/`basename $$file | sed 's/.7$$/.$(sqlmansect)/'` || exit; \
6971
done
7072
@echo timestamp >$@
7173
endif

0 commit comments

Comments
 (0)