This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Part 4 of a big cleanup action based on the upcoming dist-4.0
[metaconfig.git] / U / installdirs / man1dir.U
1 ?RCS: $Id: man1dir.U,v 3.2 1999/07/08 20:57:21 doughera Exp doughera $
2 ?RCS:
3 ?RCS: Copyright (c) 1996, 1999 Andy Dougherty
4 ?RCS: Copyright (c) 1991-1993, 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 3.0.
11 ?RCS:
12 ?RCS: $Log: man1dir.U,v $
13 ?RCS: Revision 3.2  1999/07/08 20:57:21  doughera
14 ?RCS: Used installprefix.
15 ?RCS:
16 ?RCS: Revision 3.1  1999/07/08 20:52:19  doughera
17 ?RCS: Updated for perl5.005_5x
18 ?RCS:
19 ?RCS: Revision 3.0.1.1  1997/02/28  16:10:29  ram
20 ?RCS: patch61: created
21 ?RCS:
22 ?X:     This was originally specific to perl5.  Since perl5 has man pages that
23 ?X:     go in both man1/ and man3/ directories, we need both man1dir
24 ?X:     and man3dir.  This unit is basically dist's mansrc.U with
25 ?X:     man1 used instead of man everywhere.
26 ?X:
27 ?MAKE:man1dir man1direxp man1ext installman1dir: cat nroff Loc Oldconfig \
28         spackage test Getfile Setprefixvar Prefixit Prefixup sysman Myread \
29         prefixexp
30 ?MAKE:  -pick add $@ %<
31 ?Y:TOP
32 ?D:man1dir=''
33 ?S:man1dir:
34 ?S:     This variable contains the name of the directory in which manual
35 ?S:     source pages are to be put.  It is the responsibility of the
36 ?S:     Makefile.SH to get the value of this into the proper command.
37 ?S:     You must be prepared to do the ~name expansion yourself.
38 ?S:.
39 ?D:man1direxp=''
40 ?S:man1direxp:
41 ?S:     This variable is the same as the man1dir variable, but is filename
42 ?S:     expanded at configuration time, for convenient use in makefiles.
43 ?S:.
44 ?D:installman1dir=''
45 ?S:installman1dir:
46 ?S:     This variable is really the same as man1direxp, unless you are using
47 ?S:     AFS in which case it points to the read/write location whereas
48 ?S:     man1direxp only points to the read-only access location. For extra
49 ?S:     portability, you should only use this variable within your makefiles.
50 ?S:.
51 ?S:man1ext:
52 ?S:     This variable contains the extension that the manual page should
53 ?S:     have: one of 'n', 'l', or '1'.  The Makefile must supply the '.'.
54 ?S:     See man1dir.
55 ?S:.
56 ?T:lookpath
57 ?LINT:change prefixvar
58 ?LINT:set man1direxp
59 : determine where manual pages go
60 set man1dir man1dir none
61 eval $prefixit
62 $cat <<EOM
63
64 $spackage has manual pages available in source form.
65 EOM
66 case "$nroff" in
67 nroff)
68         echo "However, you don't have nroff, so they're probably useless to you."
69         case "$man1dir" in
70         '') man1dir="none";;
71         esac;;
72 esac
73 echo "If you don't want the manual sources installed, answer 'none'."
74 case "$man1dir" in
75 ' ') dflt=none
76         ;;
77 '')
78         lookpath="$prefixexp/share/man/man1"
79         lookpath="$lookpath $prefixexp/man/man1 $prefixexp/man/l_man/man1"
80         lookpath="$lookpath $prefixexp/man/p_man/man1"
81         lookpath="$lookpath $prefixexp/man/u_man/man1"
82         lookpath="$lookpath $prefixexp/man/man.1"
83 ?X: Experience has shown people expect man1dir to be under prefix,
84 ?X: so we now always put it there.  Users who want other behavior
85 ?X: can answer interactively or use a command line option.
86 ?X: Does user have System V-style man paths.
87         case "$sysman" in
88         */?_man*)       dflt=`./loc . $prefixexp/l_man/man1 $lookpath` ;;
89         *)      dflt=`./loc . $prefixexp/man/man1 $lookpath` ;;
90         esac
91         set dflt
92         eval $prefixup
93         ;;
94 *)  dflt="$man1dir"
95         ;;
96 esac
97 echo " "
98 fn=dn+~
99 rp="Where do the main $spackage manual pages (source) go?"
100 . ./getfile
101 if $test "X$man1direxp" != "X$ansexp"; then
102         installman1dir=''
103 fi
104 prefixvar=man1dir
105 . ./setprefixvar
106
107 case "$man1dir" in
108 '')     man1dir=' '
109         installman1dir='';;
110 esac
111
112 : What suffix to use on installed man pages
113
114 case "$man1dir" in
115 ' ')
116         man1ext='0'
117         ;;
118 *)
119         rp="What suffix should be used for the main $spackage man pages?"
120         case "$man1ext" in
121         '')     case "$man1dir" in
122                 *1)  dflt=1 ;;
123                 *1p) dflt=1p ;;
124                 *1pm) dflt=1pm ;;
125                 *l) dflt=l;;
126                 *n) dflt=n;;
127                 *o) dflt=o;;
128                 *p) dflt=p;;
129                 *C) dflt=C;;
130                 *L) dflt=L;;
131                 *L1) dflt=L1;;
132                 *) dflt=1;;
133                 esac
134                 ;;
135         *)      dflt="$man1ext";;
136         esac
137         . ./myread
138         man1ext="$ans"
139         ;;
140 esac
141