mirror of
https://github.com/postgres/postgres.git
synced 2025-05-31 03:21:24 +03:00
Extend man page installation hackery so that the man page section is also
fixed up in the .so links.
This commit is contained in:
parent
c79b4505c1
commit
87698ffa8e
12
doc/Makefile
12
doc/Makefile
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 1994, Regents of the University of California
|
# Copyright (c) 1994, Regents of the University of California
|
||||||
#
|
#
|
||||||
# $PostgreSQL: pgsql/doc/Makefile,v 1.33 2009/06/18 15:10:35 petere Exp $
|
# $PostgreSQL: pgsql/doc/Makefile,v 1.34 2009/06/19 19:15:13 petere Exp $
|
||||||
#
|
#
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -43,6 +43,10 @@ sqlmansect = 7
|
|||||||
endif
|
endif
|
||||||
sqlmansectnum = $(shell expr X'$(sqlmansect)' : X'\([0-9]\)')
|
sqlmansectnum = $(shell expr X'$(sqlmansect)' : X'\([0-9]\)')
|
||||||
|
|
||||||
|
fix_sqlmansectnum = sed -e '/^\.TH/s/"7"/"$(sqlmansect)"/' \
|
||||||
|
-e 's/\\fR(7)/\\fR($(sqlmansectnum))/g' \
|
||||||
|
-e '1s/^\.so man7/.so man$(sqlmansectnum)/g;1s/^\(\.so.*\)\.7$$/\1.$(sqlmansect)/g'
|
||||||
|
|
||||||
all: man1/.timestamp man$(sqlmansectnum)/.timestamp
|
all: man1/.timestamp man$(sqlmansectnum)/.timestamp
|
||||||
|
|
||||||
man1/.timestamp: man7/.timestamp
|
man1/.timestamp: man7/.timestamp
|
||||||
@ -53,7 +57,7 @@ man7/.timestamp: man.tar.gz
|
|||||||
ifneq ($(sqlmansectnum),7)
|
ifneq ($(sqlmansectnum),7)
|
||||||
for file in man1/*.1; do \
|
for file in man1/*.1; do \
|
||||||
mv $$file $$file.bak && \
|
mv $$file $$file.bak && \
|
||||||
sed -e 's/\\fR(7)/\\fR($(sqlmansectnum))/g' $$file.bak >$$file && \
|
$(fix_sqlmansectnum) $$file.bak >$$file && \
|
||||||
rm -f $$file.bak || exit; \
|
rm -f $$file.bak || exit; \
|
||||||
done
|
done
|
||||||
endif
|
endif
|
||||||
@ -63,9 +67,7 @@ ifneq ($(sqlmansectnum),7)
|
|||||||
man$(sqlmansectnum)/.timestamp: man7/.timestamp
|
man$(sqlmansectnum)/.timestamp: man7/.timestamp
|
||||||
$(mkinstalldirs) man$(sqlmansectnum)
|
$(mkinstalldirs) man$(sqlmansectnum)
|
||||||
for file in man7/*.7; do \
|
for file in man7/*.7; do \
|
||||||
sed -e '/^\.TH/s/"7"/"$(sqlmansect)"/' \
|
$(fix_sqlmansectnum) $$file >man$(sqlmansectnum)/`basename $$file | sed 's/.7$$/.$(sqlmansect)/'` || exit; \
|
||||||
-e 's/\\fR(7)/\\fR($(sqlmansectnum))/g' \
|
|
||||||
$$file >man$(sqlmansectnum)/`basename $$file | sed 's/.7$$/.$(sqlmansect)/'` || exit; \
|
|
||||||
done
|
done
|
||||||
@echo timestamp >$@
|
@echo timestamp >$@
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user