|
4 | 4 | #
|
5 | 5 | # Copyright (c) 1994, Regents of the University of California
|
6 | 6 | #
|
7 |
| -# $PostgreSQL: pgsql/doc/Makefile,v 1.31 2008/03/18 16:24:50 petere Exp $ |
| 7 | +# $PostgreSQL: pgsql/doc/Makefile,v 1.32 2008/11/14 10:22:45 petere Exp $ |
8 | 8 | #
|
9 | 9 | #----------------------------------------------------------------------------
|
10 | 10 |
|
@@ -45,26 +45,30 @@ sqlmansectnum = $(shell expr X'$(sqlmansect)' : X'\([0-9]\)')
|
45 | 45 |
|
46 | 46 | all: man1/.timestamp man$(sqlmansectnum)/.timestamp
|
47 | 47 |
|
48 |
| -man1/.timestamp: man$(sqlmansect_dummy)/.timestamp |
| 48 | +man1/.timestamp: man7/.timestamp |
49 | 49 | @echo timestamp >$@
|
50 | 50 |
|
51 |
| -man$(sqlmansect_dummy)/.timestamp: man.tar.gz |
| 51 | +man7/.timestamp: man.tar.gz |
52 | 52 | gzip -d -c $< | $(TAR) xf -
|
| 53 | +ifneq ($(sqlmansectnum),7) |
53 | 54 | for file in man1/*.1; do \
|
54 | 55 | mv $$file $$file.bak && \
|
55 |
| - sed -e 's/\\fR($(sqlmansect_dummy))/\\fR($(sqlmansectnum))/' $$file.bak >$$file && \ |
| 56 | + sed -e 's/\\fR(7)/\\fR($(sqlmansectnum))/g' $$file.bak >$$file && \ |
56 | 57 | rm -f $$file.bak || exit; \
|
57 | 58 | done
|
| 59 | +endif |
58 | 60 | @echo timestamp >$@
|
59 | 61 |
|
60 |
| -man$(sqlmansectnum)/.timestamp: man$(sqlmansect_dummy)/.timestamp |
| 62 | +ifneq ($(sqlmansectnum),7) |
| 63 | +man$(sqlmansectnum)/.timestamp: man7/.timestamp |
61 | 64 | $(mkinstalldirs) man$(sqlmansectnum)
|
62 |
| - for file in man$(sqlmansect_dummy)/*.$(sqlmansect_dummy); do \ |
63 |
| - sed -e '/^\.TH/s/"$(sqlmansect_dummy)"/"$(sqlmansect)"/' \ |
64 |
| - -e 's/\\fR($(sqlmansect_dummy))/\\fR($(sqlmansectnum))/' \ |
65 |
| - $$file >man$(sqlmansectnum)/`basename $$file | sed 's/.$(sqlmansect_dummy)$$/.$(sqlmansect)/'` || exit; \ |
| 65 | + 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; \ |
66 | 69 | done
|
67 | 70 | @echo timestamp >$@
|
| 71 | +endif |
68 | 72 | endif # found_man
|
69 | 73 |
|
70 | 74 |
|
@@ -93,10 +97,10 @@ ifdef found_html
|
93 | 97 | rm -f $(addprefix $(DESTDIR)$(htmldir)/html/, $(shell gunzip -c $(srcdir)/postgres.tar.gz | tar tf -))
|
94 | 98 | endif
|
95 | 99 | ifdef found_man
|
96 |
| - 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)/')) |
| 100 | + rm -f $(addprefix $(DESTDIR)$(mandir)/, $(shell gunzip -c $(srcdir)/man.tar.gz | tar tf - | sed -e 's,man7/,man$(sqlmansectnum)/,' -e 's/.7$$/.$(sqlmansect)/')) |
97 | 101 | endif
|
98 | 102 |
|
99 | 103 |
|
100 | 104 | clean distclean maintainer-clean:
|
101 |
| - rm -rf man1/ man$(sqlmansectnum)/ man$(sqlmansect_dummy)/ |
| 105 | + rm -rf man1/ man7/ man$(sqlmansectnum)/ |
102 | 106 | $(MAKE) -C src $@
|
0 commit comments