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 / manfmt.U
CommitLineData
d8875586
MBT
1?RCS: $Id: manfmt.U 1 2006-08-24 12:32:52Z rmanfredi $
2?RCS:
3?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
4?RCS:
5?RCS: You may redistribute only under the terms of the Artistic Licence,
6?RCS: as specified in the README file that comes with the distribution.
7?RCS: You may reuse parts of this distribution only within the terms of
8?RCS: that same Artistic Licence; a copy of which may be found at the root
9?RCS: of the source tree for dist 4.0.
10?RCS:
11?RCS: $Log: manfmt.U,v $
12?RCS: Revision 3.0.1.5 1997/02/28 16:11:57 ram
13?RCS: patch61: don't ask for AFS when they choose to not install pages
14?RCS:
15?RCS: Revision 3.0.1.4 1995/09/25 09:16:52 ram
16?RCS: patch59: unit is now forced to the top of Configure, if possible
17?RCS:
18?RCS: Revision 3.0.1.3 1995/01/30 14:39:20 ram
19?RCS: patch49: new installmanfmt and AFS-lookup for formatted man pages
20?RCS: patch49: can now handle installation prefix changes (from WED)
21?RCS:
22?RCS: Revision 3.0.1.2 1994/08/29 16:30:31 ram
23?RCS: patch32: now uses installation prefix for default setting
24?RCS:
25?RCS: Revision 3.0.1.1 1993/09/13 16:09:22 ram
26?RCS: patch10: allows for L1 man page extension (WAD)
27?RCS:
28?RCS: Revision 3.0 1993/08/18 12:09:13 ram
29?RCS: Baseline for dist 3.0 netwide release.
30?RCS:
31?MAKE:manfmt manfmtexp installmanfmt: Getfile Loc Oldconfig cat manext \
32 spackage Prefixit prefixexp Prefixup afs test
33?MAKE: -pick add $@ %<
34?Y:TOP
35?S:manfmt:
36?S: This variable contains the name of the directory in which formatted
37?S: manual pages are to be put. It is the responsibility of the
38?S: Makefile.SH to get the value of this into the proper command. Note
39?S: that you may have to do ~name substitution. Use manfmtexp otherwise.
40?S:.
41?S:manfmtexp:
42?S: This is the same as the manfmt variable, but is filename expanded
43?S: at configuration time, for programs not willing to deal with it at
44?S: run-time.
45?S:.
46?S:installmanfmt:
47?S: This variable is really the same as manfmtexp, unless you are using
48?S: AFS in which case it points to the read/write location whereas
49?S: mansrcexp only points to the read-only access location. For extra
50?S: portability, you should only use this variable within your makefiles.
51?S:.
52?LINT:change manext
53?T:lookpath
54: determine where manual pages go
55set manfmt manfmt
56eval $prefixit
57$cat <<EOM
58
59$spackage has pre-formatted manual pages. If you don't want these installed,
60answer 'none' to the next question.
61
62EOM
63case "$manfmt" in
64'')
65 lookpath="$prefixexp/catman/man1 $prefixexp/man/cat1"
66 lookpath="$lookpath $prefixexp/catman/u_man/man1"
67 lookpath="$lookpath $prefixexp/catman/l_man/man1"
68 lookpath="$lookpath $prefixexp/catman/cat1 /usr/catman/local/man1"
69 lookpath="$lookpath /usr/catman/manl /usr/man/cat1"
70 lookpath="$lookpath /usr/catman/mann /usr/catman/l_man/man1"
71 lookpath="$lookpath /usr/catman/u_man/man1 /usr/catman/man1"
72 dflt=`./loc . none $lookpath`
73 set dflt
74 eval $prefixup
75 ;;
76*) dflt="$manfmt"
77 ;;
78esac
79fn=dn~
80rp='Where do pre-formatted manual pages go?'
81. ./getfile
82if test "X$manfmtexp" != "X$ansexp"; then
83 installmanfmt=''
84fi
85manfmt="$ans"
86manfmtexp="$ansexp"
87if $afs && $test "$manfmt"; then
88 $cat <<EOM
89
90Since you are running AFS, I need to distinguish the directory in which
91manual pages reside from the directory in which they are installed (and from
92which they are presumably copied to the former directory by occult means).
93
94EOM
95 case "$installmanfmt" in
96 '') dflt=`echo $manfmtexp | sed 's#^/afs/#/afs/.#'`;;
97 *) dflt="$installmanfmt";;
98 esac
99 fn=de~
100 rp='Where will pre-formatted man pages be installed?'
101 . ./getfile
102 installmanfmt="$ans"
103else
104 installmanfmt="$manfmtexp"
105fi
106
107case "$manfmt" in
108'') manext='0';;
109*l) manext=l;;
110*n) manext=n;;
111*o) manext=l;;
112*p) manext=n;;
113*C) manext=C;;
114*L) manext=L;;
115*L1) manext=L1;;
116*) manext=1;;
117esac
118