?RCS: $Id: man1dir.U,v 3.2 1999/07/08 20:57:21 doughera Exp doughera $
?RCS:
?RCS: Copyright (c) 1996, 1999 Andy Dougherty
?RCS: Copyright (c) 1991-1993, 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 3.0.
?RCS:
?RCS: $Log: man1dir.U,v $
?RCS: Revision 3.2  1999/07/08 20:57:21  doughera
?RCS: Used installprefix.
?RCS:
?RCS: Revision 3.1  1999/07/08 20:52:19  doughera
?RCS: Updated for perl5.005_5x
?RCS:
?RCS: Revision 3.0.1.1  1997/02/28  16:10:29  ram
?RCS: patch61: created
?RCS:
?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: cat nroff Loc Oldconfig \
	spackage test Getfile Setprefixvar Prefixit Prefixup sysman Myread \
	prefixexp
?MAKE:	-pick add $@ %<
?Y:TOP
?D:man1dir=''
?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:.
?D:man1direxp=''
?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:.
?D:installman1dir=''
?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
?LINT:change prefixvar
?LINT:set man1direxp
: 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/share/man/man1"
	lookpath="$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
prefixvar=man1dir
. ./setprefixvar

case "$man1dir" in
'')	man1dir=' '
	installman1dir='';;
esac

: 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

