summaryrefslogtreecommitdiff
path: root/mcon/U/man1dir.U
blob: b503690eeac85fbe839a758b7a9c22aaa74779ee (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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
?RCS: $Id$
?RCS:
?RCS: Copyright (c) 1996, Andy Dougherty
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: man1dir.U,v $
?RCS: Revision 3.0.1.1  1997/02/28  16:10:29  ram
?RCS: patch61: created
?RCS:
?X:
?X:	This was originally specific to perl5.  Since perl5 has man pages that
?X:	go in both man1/ and man3/ directories, we need both man1dir
?X:	and man3dir.  This unit is basically dist's mansrc.U with
?X:	man1 used instead of man everywhere.
?X:
?MAKE:man1dir man1direxp man1ext installman1dir: afs cat nroff Loc Oldconfig \
	spackage test Getfile Prefixit prefixexp Prefixup sysman Myread
?MAKE:	-pick add $@ %<
?Y:TOP
?S:man1dir:
?S:	This variable contains the name of the directory in which manual
?S:	source pages are to be put.  It is the responsibility of the
?S:	Makefile.SH to get the value of this into the proper command.
?S:	You must be prepared to do the ~name expansion yourself.
?S:.
?S:man1direxp:
?S:	This variable is the same as the man1dir variable, but is filename
?S:	expanded at configuration time, for convenient use in makefiles.
?S:.
?S:installman1dir:
?S:	This variable is really the same as man1direxp, unless you are using
?S:	AFS in which case it points to the read/write location whereas
?S:	man1direxp only points to the read-only access location. For extra
?S:	portability, you should only use this variable within your makefiles.
?S:.
?S:man1ext:
?S:	This variable contains the extension that the manual page should
?S:	have: one of 'n', 'l', or '1'.  The Makefile must supply the '.'.
?S:	See man1dir.
?S:.
?T:lookpath
: determine where manual pages go
set man1dir man1dir none
eval $prefixit
$cat <<EOM

$spackage has manual pages available in source form.
EOM
case "$nroff" in
nroff)
	echo "However, you don't have nroff, so they're probably useless to you."
	case "$man1dir" in
	'') man1dir="none";;
	esac;;
esac
echo "If you don't want the manual sources installed, answer 'none'."
case "$man1dir" in
' ') dflt=none
	;;
'')
	lookpath="$prefixexp/man/man1 $prefixexp/man/l_man/man1"
	lookpath="$lookpath $prefixexp/man/p_man/man1"
	lookpath="$lookpath $prefixexp/man/u_man/man1"
	lookpath="$lookpath $prefixexp/man/man.1"
?X: Experience has shown people expect man1dir to be under prefix,
?X: so we now always put it there.  Users who want other behavior
?X: can answer interactively or use a command line option.
?X: Does user have System V-style man paths.
	case "$sysman" in
	*/?_man*)	dflt=`./loc . $prefixexp/l_man/man1 $lookpath` ;;
	*)	dflt=`./loc . $prefixexp/man/man1 $lookpath` ;;
	esac
	set dflt
	eval $prefixup
	;;
*)  dflt="$man1dir"
	;;
esac
echo " "
fn=dn+~
rp="Where do the main $spackage manual pages (source) go?"
. ./getfile
if $test "X$man1direxp" != "X$ansexp"; then
	installman1dir=''
fi
man1dir="$ans"
man1direxp="$ansexp"
case "$man1dir" in
'') man1dir=' '
	installman1dir='';;
esac
if $afs; then
	$cat <<EOM

Since you are running AFS, I need to distinguish the directory in which
manual pages reside from the directory in which they are installed (and from
which they are presumably copied to the former directory by occult means).

EOM
	case "$installman1dir" in
	'') dflt=`echo $man1direxp | sed 's#^/afs/#/afs/.#'`;;
	*) dflt="$installman1dir";;
	esac
	fn=de~
	rp='Where will man pages be installed?'
	. ./getfile
	installman1dir="$ans"
else
	installman1dir="$man1direxp"
fi

: What suffix to use on installed man pages

case "$man1dir" in
' ')
	man1ext='0'
	;;
*)
	rp="What suffix should be used for the main $spackage man pages?"
	case "$man1ext" in
	'')	case "$man1dir" in
		*1)  dflt=1 ;;
		*1p) dflt=1p ;;
		*1pm) dflt=1pm ;;
		*l) dflt=l;;
		*n) dflt=n;;
		*o) dflt=o;;
		*p) dflt=p;;
		*C) dflt=C;;
		*L) dflt=L;;
		*L1) dflt=L1;;
		*) dflt=1;;
		esac
		;;
	*)	dflt="$man1ext";;
	esac
	. ./myread
	man1ext="$ans"
	;;
esac