blob: 4696639545116df6935f56ed7ebae89b5a52e4d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
$NetBSD: patch-ac,v 1.4 2007/05/28 20:14:00 heinz Exp $
Extensive hacking around - instead of installing manual pages which
simply source other man pages, make a symbolic link to the target.
--- man/makefile.src.orig 1992-02-27 22:26:52.000000000 +0100
+++ man/makefile.src
@@ -197,11 +197,9 @@ PAGE3_INSTALL_NAME = \`basename \$$i\`
GET_SETUP_OK_PAGE3 = man3/rle_get_setup_ok.3
#endif
-PAGES5 = ${MANPAGES5} ${SOPAGES5}
+MANPAGES5 = man5/rle.5
-MANPAGES5 = rle.5
-
-SOPAGES5 = RLE.5
+SOPAGES5 = man5/RLE.5
# Default action is to print all man pages
all:
@@ -211,55 +209,72 @@ all:
# Put the manual pages into a global location
install: install-1 install-3 install-5
- touch install
install-1: $(PAGES1)
@-sh -c "if test '$(DEST)X' != X ; then \
for i in $? ; do \
dpgm=\`basename \$$i .1\`.$(SUFF1) ; \
- echo cp \$$i $(DEST1)/\$$dpgm ; \
- cp \$$i $(DEST1)/\$$dpgm ; \
+ echo cp \$$i $(DESTDIR)$(DEST1)/\$$dpgm ; \
+ cp \$$i $(DESTDIR)$(DEST1)/\$$dpgm ; \
done ; \
else \
true ; \
fi"
- touch install-1
-install-3: $(PAGES3)
+install-3: $(MANPAGES3) 3links
@-sh -c "if test '$(DEST)X' != X ; then \
- for i in $? ; do \
+ for i in ${MANPAGES3} ; do \
dpgm=${PAGE3_INSTALL_NAME} ; \
- echo cp \$$i $(DEST3)/\$$dpgm ; \
- cp \$$i $(DEST3)/\$$dpgm ; \
+ echo cp \$$i $(DESTDIR)$(DEST3)/\$$dpgm ; \
+ cp \$$i $(DESTDIR)$(DEST3)/\$$dpgm ; \
done ; \
else \
true ; \
fi"
- touch install-3
-install-5: man5/*.5
+3links: ${SOPAGES3}
+ @for i in ${SOPAGES3}; do \
+ dpgm=`echo $$i | sed -e 's|.*/||'` ; \
+ tgt=`awk '/^\.so/ { print \$$2; exit}' < \$$i`; \
+ echo "ln -fs ../$$tgt $(DESTDIR)${DEST3}/$$dpgm"; \
+ ln -fs ../$$tgt $(DESTDIR)${DEST3}/$$dpgm; \
+ done
+
+install-5: ${MANPAGES5} 5links
@-sh -c "if test $(DEST)X != X; then \
- echo cp $? $(DEST5); \
- cp $? $(DEST5); \
+ for i in ${MANPAGES5} ; do \
+ dpgm=${PAGE3_INSTALL_NAME} ; \
+ echo cp \$$i $(DESTDIR)$(DEST5)/\$$dpgm; \
+ cp \$$i $(DESTDIR)$(DEST5)/\$$dpgm; \
+ done; \
else true; \
fi"
- touch install-5
+
+5links: ${SOPAGES5}
+ @for i in ${SOPAGES5}; do \
+ dpgm=`echo $$i | sed -e 's|.*/||'` ; \
+ tgt=`awk '/^\.so/ { print \$$2; exit}' < \$$i`; \
+ echo "ln -fs ../$$tgt $(DESTDIR)${DEST5}/$$dpgm"; \
+ ln -fs ../$$tgt $(DESTDIR)${DEST5}/$$dpgm; \
+ done
+
+
# Clean up installed man pages
pristine:
-rm -f install*
@-if test $(DEST)X != X ; then \
for i in man1/*.1 ; do \
- echo "rm -f $(DEST1)/`basename $$i .1`.$(SUFF1)" ;\
- rm -f $(DEST1)/`basename $$i .1`.$(SUFF1) ;\
+ echo "rm -f $(DESTDIR)$(DEST1)/`basename $$i .1`.$(SUFF1)" ;\
+ rm -f $(DESTDIR)$(DEST1)/`basename $$i .1`.$(SUFF1) ;\
done ; \
for i in $(PAGES3) ; do \
- eval "echo rm -f $(DEST3)/${PAGE3_INSTALL_NAME}" ; \
- eval "rm -f $(DEST3)/${PAGE3_INSTALL_NAME}" ; \
+ eval "echo rm -f $(DESTDIR)$(DEST3)/${PAGE3_INSTALL_NAME}" ; \
+ eval "rm -f $(DESTDIR)$(DEST3)/${PAGE3_INSTALL_NAME}" ; \
done ; \
for i in man5/*.5 ; do \
- echo rm -f $(DEST5)/$$i ; \
- rm -f $(DEST5)/$$i ; \
+ echo rm -f $(DESTDIR)$(DEST5)/$$i ; \
+ rm -f $(DESTDIR)$(DEST5)/$$i ; \
done ; \
else \
true ;\
|