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 / man1dir.U
CommitLineData
d8875586
MBT
1?RCS: $Id: man1dir.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: man1dir.U,v $
13?RCS: Revision 3.0.1.1 1997/02/28 16:10:29 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: man1 used instead of man everywhere.
21?X:
22?MAKE:man1dir man1direxp man1ext installman1dir: afs cat nroff Loc Oldconfig \
23 spackage test Getfile Prefixit prefixexp Prefixup sysman Myread
24?MAKE: -pick add $@ %<
25?Y:TOP
26?S:man1dir:
27?S: This variable contains the name of the directory in which manual
28?S: source pages are to be put. It is the responsibility of the
29?S: Makefile.SH to get the value of this into the proper command.
30?S: You must be prepared to do the ~name expansion yourself.
31?S:.
32?S:man1direxp:
33?S: This variable is the same as the man1dir variable, but is filename
34?S: expanded at configuration time, for convenient use in makefiles.
35?S:.
36?S:installman1dir:
37?S: This variable is really the same as man1direxp, unless you are using
38?S: AFS in which case it points to the read/write location whereas
39?S: man1direxp only points to the read-only access location. For extra
40?S: portability, you should only use this variable within your makefiles.
41?S:.
42?S:man1ext:
43?S: This variable contains the extension that the manual page should
44?S: have: one of 'n', 'l', or '1'. The Makefile must supply the '.'.
45?S: See man1dir.
46?S:.
47?T:lookpath
48: determine where manual pages go
49set man1dir man1dir none
50eval $prefixit
51$cat <<EOM
52
53$spackage has manual pages available in source form.
54EOM
55case "$nroff" in
56nroff)
57 echo "However, you don't have nroff, so they're probably useless to you."
58 case "$man1dir" in
59 '') man1dir="none";;
60 esac;;
61esac
62echo "If you don't want the manual sources installed, answer 'none'."
63case "$man1dir" in
64' ') dflt=none
65 ;;
66'')
67 lookpath="$prefixexp/man/man1 $prefixexp/man/l_man/man1"
68 lookpath="$lookpath $prefixexp/man/p_man/man1"
69 lookpath="$lookpath $prefixexp/man/u_man/man1"
70 lookpath="$lookpath $prefixexp/man/man.1"
71?X: Experience has shown people expect man1dir to be under prefix,
72?X: so we now always put it there. Users who want other behavior
73?X: can answer interactively or use a command line option.
74?X: Does user have System V-style man paths.
75 case "$sysman" in
76 */?_man*) dflt=`./loc . $prefixexp/l_man/man1 $lookpath` ;;
77 *) dflt=`./loc . $prefixexp/man/man1 $lookpath` ;;
78 esac
79 set dflt
80 eval $prefixup
81 ;;
82*) dflt="$man1dir"
83 ;;
84esac
85echo " "
86fn=dn+~
87rp="Where do the main $spackage manual pages (source) go?"
88. ./getfile
89if $test "X$man1direxp" != "X$ansexp"; then
90 installman1dir=''
91fi
92man1dir="$ans"
93man1direxp="$ansexp"
94case "$man1dir" in
95'') man1dir=' '
96 installman1dir='';;
97esac
98if $afs; then
99 $cat <<EOM
100
101Since you are running AFS, I need to distinguish the directory in which
102manual pages reside from the directory in which they are installed (and from
103which they are presumably copied to the former directory by occult means).
104
105EOM
106 case "$installman1dir" in
107 '') dflt=`echo $man1direxp | sed 's#^/afs/#/afs/.#'`;;
108 *) dflt="$installman1dir";;
109 esac
110 fn=de~
111 rp='Where will man pages be installed?'
112 . ./getfile
113 installman1dir="$ans"
114else
115 installman1dir="$man1direxp"
116fi
117
118: What suffix to use on installed man pages
119
120case "$man1dir" in
121' ')
122 man1ext='0'
123 ;;
124*)
125 rp="What suffix should be used for the main $spackage man pages?"
126 case "$man1ext" in
127 '') case "$man1dir" in
128 *1) dflt=1 ;;
129 *1p) dflt=1p ;;
130 *1pm) dflt=1pm ;;
131 *l) dflt=l;;
132 *n) dflt=n;;
133 *o) dflt=o;;
134 *p) dflt=p;;
135 *C) dflt=C;;
136 *L) dflt=L;;
137 *L1) dflt=L1;;
138 *) dflt=1;;
139 esac
140 ;;
141 *) dflt="$man1ext";;
142 esac
143 . ./myread
144 man1ext="$ans"
145 ;;
146esac
147