Commit | Line | Data |
---|---|---|
d8875586 MBT |
1 | ?RCS: $Id: mansrc.U 1 2006-08-24 12:32:52Z rmanfredi $ |
2 | ?RCS: | |
3 | ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi | |
4 | ?RCS: | |
5 | ?RCS: You may redistribute only under the terms of the Artistic Licence, | |
6 | ?RCS: as specified in the README file that comes with the distribution. | |
7 | ?RCS: You may reuse parts of this distribution only within the terms of | |
8 | ?RCS: that same Artistic Licence; a copy of which may be found at the root | |
9 | ?RCS: of the source tree for dist 4.0. | |
10 | ?RCS: | |
11 | ?RCS: $Log: mansrc.U,v $ | |
12 | ?RCS: Revision 3.0.1.9 1997/02/28 16:12:03 ram | |
13 | ?RCS: patch61: don't ask for AFS when they choose to not install pages | |
14 | ?RCS: | |
15 | ?RCS: Revision 3.0.1.8 1995/09/25 09:16:58 ram | |
16 | ?RCS: patch59: unit is now forced to the top of Configure, if possible | |
17 | ?RCS: | |
18 | ?RCS: Revision 3.0.1.7 1995/02/15 14:15:31 ram | |
19 | ?RCS: patch51: was mistakenly duplicating /usr/local/man/man1 (ADO) | |
20 | ?RCS: patch51: added /opt/man/man1 to the lookpath (ADO) | |
21 | ?RCS: | |
22 | ?RCS: Revision 3.0.1.6 1995/01/30 14:39:34 ram | |
23 | ?RCS: patch49: can now handle installation prefix changes (from WED) | |
24 | ?RCS: | |
25 | ?RCS: Revision 3.0.1.5 1995/01/11 15:32:25 ram | |
26 | ?RCS: patch45: can now use Loc variables since path stripping is deferred | |
27 | ?RCS: | |
28 | ?RCS: Revision 3.0.1.4 1994/08/29 16:30:38 ram | |
29 | ?RCS: patch32: now uses installation prefix for default setting | |
30 | ?RCS: | |
31 | ?RCS: Revision 3.0.1.3 1994/05/06 15:11:10 ram | |
32 | ?RCS: patch23: added lint hint, assuring that nroff is used | |
33 | ?RCS: | |
34 | ?RCS: Revision 3.0.1.2 1994/01/24 14:14:39 ram | |
35 | ?RCS: patch16: now uses _nroff in case user asked for portability | |
36 | ?RCS: | |
37 | ?RCS: Revision 3.0.1.1 1993/09/13 16:09:31 ram | |
38 | ?RCS: patch10: allows for L1 man page extension (WAD) | |
39 | ?RCS: | |
40 | ?RCS: Revision 3.0 1993/08/18 12:09:14 ram | |
41 | ?RCS: Baseline for dist 3.0 netwide release. | |
42 | ?RCS: | |
43 | ?MAKE:mansrc mansrcexp manext installmansrc: afs cat nroff Loc Oldconfig \ | |
44 | sysman spackage test Getfile Prefixit prefixexp Prefixup | |
45 | ?MAKE: -pick add $@ %< | |
46 | ?Y:TOP | |
47 | ?S:mansrc: | |
48 | ?S: This variable contains the name of the directory in which manual | |
49 | ?S: source pages are to be put. It is the responsibility of the | |
50 | ?S: Makefile.SH to get the value of this into the proper command. | |
51 | ?S: You must be prepared to do the ~name expansion yourself. | |
52 | ?S:. | |
53 | ?S:mansrcexp: | |
54 | ?S: This variable is the same as the mansrc variable, but is filename | |
55 | ?S: expanded at configuration time, for convenient use in makefiles. | |
56 | ?S:. | |
57 | ?S:installmansrc: | |
58 | ?S: This variable is really the same as mansrcexp, unless you are using | |
59 | ?S: AFS in which case it points to the read/write location whereas | |
60 | ?S: mansrcexp only points to the read-only access location. For extra | |
61 | ?S: portability, you should only use this variable within your makefiles. | |
62 | ?S:. | |
63 | ?S:manext: | |
64 | ?S: This variable contains the extension that the manual page should | |
65 | ?S: have: one of 'n', 'l', or '1'. The Makefile must supply the '.'. | |
66 | ?S: See mansrc. | |
67 | ?S:. | |
68 | ?T:lookpath | |
69 | : determine where manual pages go | |
70 | set mansrc mansrc none | |
71 | eval $prefixit | |
72 | $cat <<EOM | |
73 | ||
74 | $spackage has manual pages available in source form. | |
75 | EOM | |
76 | case "$nroff" in | |
77 | nroff) | |
78 | echo "However, you don't have nroff, so they're probably useless to you." | |
79 | case "$mansrc" in | |
80 | '') mansrc="none";; | |
81 | esac;; | |
82 | esac | |
83 | echo "If you don't want the manual sources installed, answer 'none'." | |
84 | case "$mansrc" in | |
85 | '') | |
86 | lookpath="$prefixexp/share/man/man1 $prefixexp/man/man1" | |
87 | lookpath="$lookpath $prefixexp/man/u_man/man1 $prefixexp/man/l_man/man1" | |
88 | lookpath="$lookpath /usr/local/man/man1 /opt/man/man1 /usr/man/manl" | |
89 | lookpath="$lookpath /usr/share/man/man1 /usr/local/share/man/man1" | |
90 | lookpath="$lookpath /usr/man/local/man1 /usr/man/l_man/man1" | |
91 | lookpath="$lookpath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1" | |
92 | lookpath="$lookpath /usr/man/man.L" | |
93 | mansrc=`./loc . $prefixexp/man/man1 $lookpath` | |
94 | if $test -d "$mansrc"; then | |
95 | dflt="$mansrc" | |
96 | else | |
97 | dflt="$sysman" | |
98 | fi | |
99 | set dflt | |
100 | eval $prefixup | |
101 | ;; | |
102 | ' ') dflt=none;; | |
103 | *) dflt="$mansrc" | |
104 | ;; | |
105 | esac | |
106 | echo " " | |
107 | fn=dn~ | |
108 | rp='Where do the manual pages (source) go?' | |
109 | . ./getfile | |
110 | if test "X$mansrcexp" != "X$ansexp"; then | |
111 | installmansrc='' | |
112 | fi | |
113 | mansrc="$ans" | |
114 | mansrcexp="$ansexp" | |
115 | case "$mansrc" in | |
116 | '') mansrc=' ' | |
117 | installmansrc='';; | |
118 | esac | |
119 | if $afs && $test "$mansrc"; then | |
120 | $cat <<EOM | |
121 | ||
122 | Since you are running AFS, I need to distinguish the directory in which | |
123 | manual pages reside from the directory in which they are installed (and from | |
124 | which they are presumably copied to the former directory by occult means). | |
125 | ||
126 | EOM | |
127 | case "$installmansrc" in | |
128 | '') dflt=`echo $mansrcexp | sed 's#^/afs/#/afs/.#'`;; | |
129 | *) dflt="$installmansrc";; | |
130 | esac | |
131 | fn=de~ | |
132 | rp='Where will man pages be installed?' | |
133 | . ./getfile | |
134 | installmansrc="$ans" | |
135 | else | |
136 | installmansrc="$mansrcexp" | |
137 | fi | |
138 | ||
139 | case "$mansrc" in | |
140 | ' ') manext='0';; | |
141 | *l) manext=l;; | |
142 | *n) manext=n;; | |
143 | *o) manext=l;; | |
144 | *p) manext=n;; | |
145 | *C) manext=C;; | |
146 | *L) manext=L;; | |
147 | *L1) manext=L1;; | |
148 | *) manext=1;; | |
149 | esac | |
150 |