Debian Codegraph @

regen-configure/U/installdirs/man3dir.U

raw
1 ?RCS: $Id: man3dir.U,v 3.1 1999/07/08 20:52:19 doughera Exp doughera $
2 ?RCS:
3 ?RCS: Copyright (c) 1996-1999, Andy Dougherty
4 ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
5 ?RCS:
6 ?RCS: You may redistribute only under the terms of the Artistic License,
7 ?RCS: as specified in the README file that comes with the distribution.
8 ?RCS: You may reuse parts of this distribution only within the terms of
9 ?RCS: that same Artistic License; a copy of which may be found at the root
10 ?RCS: of the source tree for dist 3.0.
11 ?RCS:
12 ?RCS: $Log: man3dir.U,v $
13 ?RCS: Revision 3.1 1999/07/08 20:52:19 doughera
14 ?RCS: Updated for perl5.005_5x
15 ?RCS:
16 ?RCS: Revision 3.0.1.1 1997/02/28 16:10:34 ram
17 ?RCS: patch61: created
18 ?RCS:
19 ?X: This was originally specific to perl5. Since perl5 has man pages that
20 ?X: go in both man1/ and man3/ directories, we need both man1dir
21 ?X: and man3dir. This unit is basically dist's mansrc.U with
22 ?X: man3 used instead of man everywhere.
23 ?X: I then added various tests because perl5 has *lots* of man3
24 ?X: pages with long file names. -- ADO
25 ?X:
26 ?MAKE:man3dir man3direxp man3ext installman3dir: cat nroff Loc Oldconfig \
27 sed man1dir spackage package Getfile Setprefixvar Prefixit Prefixup \
28 d_flexfnam privlib Myread test
29 ?MAKE: -pick add $@ %<
30 ?Y:TOP
31 ?D:man3dir=''
32 ?S:man3dir:
33 ?S: This variable contains the name of the directory in which manual
34 ?S: source pages are to be put. It is the responsibility of the
35 ?S: Makefile.SH to get the value of this into the proper command.
36 ?S: You must be prepared to do the ~name expansion yourself.
37 ?S:.
38 ?D:man3direxp=''
39 ?S:man3direxp:
40 ?S: This variable is the same as the man3dir variable, but is filename
41 ?S: expanded at configuration time, for convenient use in makefiles.
42 ?S:.
43 ?D:installman3dir=''
44 ?S:installman3dir:
45 ?S: This variable is really the same as man3direxp, unless you are using
46 ?S: AFS in which case it points to the read/write location whereas
47 ?S: man3direxp only points to the read-only access location. For extra
48 ?S: portability, you should only use this variable within your makefiles.
49 ?S:.
50 ?S:man3ext:
51 ?S: This variable contains the extension that the manual page should
52 ?S: have: one of 'n', 'l', or '3'. The Makefile must supply the '.'.
53 ?S: See man3dir.
54 ?S:.
55 ?T:prog tdflt
56 ?LINT:change prefixvar
57 ?LINT:set man3direxp
58 : determine where library module manual pages go
59 set man3dir man3dir none
60 eval $prefixit
61 $cat <<EOM
62
63 $spackage has manual pages for many of the library modules.
64 EOM
65
66 case "$nroff" in
67 nroff)
68 $cat <<'EOM'
69 However, you don't have nroff, so they're probably useless to you.
70 EOM
71 case "$man3dir" in
72 '') man3dir="none";;
73 esac;;
74 esac
75
76 case "$d_flexfnam" in
77 undef)
78 $cat <<'EOM'
79 However, your system can't handle the long file names like File::Basename.3.
80 EOM
81 case "$man3dir" in
82 '') man3dir="none";;
83 esac;;
84 esac
85
86 echo "If you don't want the manual sources installed, answer 'none'."
87 ?X: In 5.005_57 and earlier, I had the following notes:
88 ?X: We do not use /usr/local/man/man3 because some man programs will
89 ?X: only show the /usr/local/man/man3 contents, and not the system ones,
90 ?X: thus man less will show the perl module less.pm, but not the system
91 ?X: less command. We might also conflict with Tcl man pages.
92 ?X: However, something like /opt/perl/man/man3 is fine.
93 ?X:
94 ?X: However, opinion seems to be shifting such that 'man POSIX' ought
95 ?X: to just work. -- Andy Dougherty July 8, 1999
96 ?X:
97 ?X: remove any trailing -3.0 or other version indication from $package
98 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
99 case "$man3dir" in
100 '') dflt=`echo "$man1dir" | $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'`
101 if $test -d "$privlib/man/man3"; then
102 cat <<EOM >&4
103
104 WARNING: Previous versions of perl installed man3 pages into
105 $privlib/man/man3. This version will suggest a
106 new default of $dflt.
107 EOM
108 tdflt=$dflt
109 dflt='n'
110 rp='Do you wish to preserve the old behavior?(y/n)'
111 . ./myread
112 case "$ans" in
113 y*) dflt="$privlib/man/man3" ;;
114 *) dflt=$tdflt ;;
115 esac
116 fi
117 ;;
118 *) dflt="$man3dir" ;;
119 esac
120 case "$dflt" in
121 ' ') dflt=none ;;
122 esac
123 echo " "
124 fn=dn+~
125 rp="Where do the $package library man pages (source) go?"
126 . ./getfile
127 prefixvar=man3dir
128 . ./setprefixvar
129
130 case "$man3dir" in
131 '') man3dir=' '
132 installman3dir='';;
133 esac
134
135 : What suffix to use on installed man pages
136 case "$man3dir" in
137 ' ')
138 man3ext='0'
139 ;;
140 *)
141 rp="What suffix should be used for the $package library man pages?"
142 case "$man3ext" in
143 '') case "$man3dir" in
144 *3) dflt=3 ;;
145 *3p) dflt=3p ;;
146 *3pm) dflt=3pm ;;
147 *l) dflt=l;;
148 *n) dflt=n;;
149 *o) dflt=o;;
150 *p) dflt=p;;
151 *C) dflt=C;;
152 *L) dflt=L;;
153 *L3) dflt=L3;;
154 *) dflt=3;;
155 esac
156 ;;
157 *) dflt="$man3ext";;
158 esac
159 . ./myread
160 man3ext="$ans"
161 ;;
162 esac
163