This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add the files from dist/meta to perl's repo
[metaconfig.git] / dist / U / man3dir.U
CommitLineData
d8875586
MBT
1?RCS: $Id: man3dir.U 1 2006-08-24 12:32:52Z rmanfredi $
2?RCS:
3?RCS: Copyright (c) 1996, Andy Dougherty
4?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
5?RCS:
6?RCS: You may redistribute only under the terms of the Artistic Licence,
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 Licence; a copy of which may be found at the root
10?RCS: of the source tree for dist 4.0.
11?RCS:
12?RCS: $Log: man3dir.U,v $
13?RCS: Revision 3.0.1.1 1997/02/28 16:10:34 ram
14?RCS: patch61: created
15?RCS:
16?X:
17?X: This was originally specific to perl5. Since perl5 has man pages that
18?X: go in both man1/ and man3/ directories, we need both man1dir
19?X: and man3dir. This unit is basically dist's mansrc.U with
20?X: man3 used instead of man everywhere.
21?X: I then added various tests because perl5 has *lots* of man3
22?X: pages with long file names. -- ADO
23?X:
24?MAKE:man3dir man3direxp man3ext installman3dir: afs cat nroff Loc Oldconfig \
25 sed man1dir spackage package Getfile prefix Prefixit Prefixup \
26 d_flexfnam privlib Myread
27?MAKE: -pick add $@ %<
28?Y:TOP
29?S:man3dir:
30?S: This variable contains the name of the directory in which manual
31?S: source pages are to be put. It is the responsibility of the
32?S: Makefile.SH to get the value of this into the proper command.
33?S: You must be prepared to do the ~name expansion yourself.
34?S:.
35?S:man3direxp:
36?S: This variable is the same as the man3dir variable, but is filename
37?S: expanded at configuration time, for convenient use in makefiles.
38?S:.
39?S:installman3dir:
40?S: This variable is really the same as man3direxp, unless you are using
41?S: AFS in which case it points to the read/write location whereas
42?S: man3direxp only points to the read-only access location. For extra
43?S: portability, you should only use this variable within your makefiles.
44?S:.
45?S:man3ext:
46?S: This variable contains the extension that the manual page should
47?S: have: one of 'n', 'l', or '3'. The Makefile must supply the '.'.
48?S: See man3dir.
49?S:.
50: determine where library module manual pages go
51set man3dir man3dir none
52eval $prefixit
53$cat <<EOM
54
55$spackage has manual pages for many of the library modules.
56EOM
57
58case "$nroff" in
59nroff)
60 $cat <<'EOM'
61However, you don't have nroff, so they're probably useless to you.
62EOM
63 case "$man3dir" in
64 '') man3dir="none";;
65 esac;;
66esac
67
68case "$d_flexfnam" in
69undef)
70 $cat <<'EOM'
71However, your system can't handle the long file names like File::Basename.3.
72EOM
73 case "$man3dir" in
74 '') man3dir="none";;
75 esac;;
76esac
77
78echo "If you don't want the manual sources installed, answer 'none'."
79?X: We dont use /usr/local/man/man3 because some man programs will
80?X: only show the /usr/local/man/man3 contents, and not the system ones,
81?X: thus man less will show the perl module less.pm, but not the system
82?X: less command. We might also conflict with TCL man pages.
83?X: However, something like /opt/perl/man/man3 is fine.
84case "$man3dir" in
85'') case "$prefix" in
86 *$package*) dflt=`echo $man1dir |
87 $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'` ;;
88 *) dflt="$privlib/man/man3" ;;
89 esac
90 ;;
91' ') dflt=none;;
92*) dflt="$man3dir" ;;
93esac
94echo " "
95
96fn=dn+~
97rp="Where do the $package library man pages (source) go?"
98. ./getfile
99if test "X$man3direxp" != "X$ansexp"; then
100 installman3dir=''
101fi
102
103man3dir="$ans"
104man3direxp="$ansexp"
105case "$man3dir" in
106'') man3dir=' '
107 installman3dir='';;
108esac
109if $afs; then
110 $cat <<EOM
111
112Since you are running AFS, I need to distinguish the directory in which
113manual pages reside from the directory in which they are installed (and from
114which they are presumably copied to the former directory by occult means).
115
116EOM
117 case "$installman3dir" in
118 '') dflt=`echo $man3direxp | sed 's#^/afs/#/afs/.#'`;;
119 *) dflt="$installman3dir";;
120 esac
121 fn=de~
122 rp='Where will man pages be installed?'
123 . ./getfile
124 installman3dir="$ans"
125else
126 installman3dir="$man3direxp"
127fi
128
129: What suffix to use on installed man pages
130
131case "$man3dir" in
132' ')
133 man3ext='0'
134 ;;
135*)
136 rp="What suffix should be used for the $package library man pages?"
137 case "$man3ext" in
138 '') case "$man3dir" in
139 *3) dflt=3 ;;
140 *3p) dflt=3p ;;
141 *3pm) dflt=3pm ;;
142 *l) dflt=l;;
143 *n) dflt=n;;
144 *o) dflt=o;;
145 *p) dflt=p;;
146 *C) dflt=C;;
147 *L) dflt=L;;
148 *L3) dflt=L3;;
149 *) dflt=3;;
150 esac
151 ;;
152 *) dflt="$man3ext";;
153 esac
154 . ./myread
155 man3ext="$ans"
156 ;;
157esac
158