This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add support for Bitrig BSD
[metaconfig.git] / U / perl / mandirs.U
1 ?RCS: $Id: mandirs.U,v $
2 ?RCS:
3 ?RCS: Copyright (c) 2000, Andy Dougherty
4 ?RCS:
5 ?RCS: You may redistribute only under the terms of the Artistic License,
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 License; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 3.0.
10 ?RCS:
11 ?RCS: $Log: mandirs.U,v $
12 ?RCS:
13 ?MAKE: man1 man2 man3 man4 man5 man6 man7 man8 \
14         man2ext man4ext man5ext man6ext man7ext man8ext: \
15         mandirstyle man1dir man1ext man3dir prefix sed
16 ?MAKE:  -pick add $@ %<
17 ?Y:TOP
18 ?X:     This unit just provides convenient definitions so that
19 ?X:     MakeMaker can sensibly assume that man5 pages go in
20 ?X:     $prefix/man/$man5 (or $siteprefix/man/$man5 as appropriate)
21 ?X:     and the BSD vs. SVR4 directory naming conventions will be
22 ?X:     handled automatically, as will older System V
23 ?X:     $prefix/man/u_man style directories.
24 ?X:
25 ?S:man1:
26 ?S:     Man 1 pages will normally be installed in $prefix/man/$man1.
27 ?S:     This variable handles SysV/SVR4/BSD conventions appropriately.
28 ?S:     See mandirstyle.
29 ?S:.
30 ?S:man2:
31 ?S:     Man 2 pages will normally be installed in $prefix/man/$man2.
32 ?S:     This variable handles SysV/SVR4/BSD conventions appropriately.
33 ?S:     See mandirstyle.
34 ?S:.
35 ?S:man2ext:
36 ?S:     Extension for man2 pages, typically just '2'.  See mandirstyle.
37 ?S:.
38 ?S:man3:
39 ?S:     Man 3 pages will normally be installed in $prefix/man/$man3.
40 ?S:     This variable handles SysV/SVR4/BSD conventions appropriately.
41 ?S:     See mandirstyle.
42 ?S:.
43 ?S:man4:
44 ?S:     Man 4 pages will normally be installed in $prefix/man/$man4.
45 ?S:     This variable handles SysV/SVR4/BSD conventions appropriately.
46 ?S:     See mandirstyle.
47 ?S:.
48 ?S:man4ext:
49 ?S:     Extension for man4 pages, typically just '4'.  See mandirstyle.
50 ?S:.
51 ?S:man5:
52 ?S:     Man 5 pages will normally be installed in $prefix/man/$man5.
53 ?S:     This variable handles SysV/SVR4/BSD conventions appropriately.
54 ?S:     See mandirstyle.
55 ?S:.
56 ?S:man5ext:
57 ?S:     Extension for man5 pages, typically just '5'.  See mandirstyle.
58 ?S:.
59 ?S:man6:
60 ?S:     Man 6 pages will normally be installed in $prefix/man/$man6.
61 ?S:     This variable handles SysV/SVR4/BSD conventions appropriately.
62 ?S:     See mandirstyle.
63 ?S:.
64 ?S:man6ext:
65 ?S:     Extension for man6 pages, typically just '6'.  See mandirstyle.
66 ?S:.
67 ?S:man7:
68 ?S:     Man 7 pages will normally be installed in $prefix/man/$man7.
69 ?S:     This variable handles SysV/SVR4/BSD conventions appropriately.
70 ?S:     See mandirstyle.
71 ?S:.
72 ?S:man7ext:
73 ?S:     Extension for man7 pages, typically just '7'.  See mandirstyle.
74 ?S:.
75 ?S:man8:
76 ?S:     Man 8 pages will normally be installed in $prefix/man/$man8.
77 ?S:     This variable handles SysV/SVR4/BSD conventions appropriately.
78 ?S:     See mandirstyle.
79 ?S:.
80 ?S:man8ext:
81 ?S:     Extension for man8 pages, typically just '8'.  See mandirstyle.
82 ?S:.
83 ?LINT: set man2 man4 man5 man6 man7 man8
84 ?LINT: set man2ext man4ext
85 ?LINT: set man5ext man6ext man7ext man8ext
86 ?T: num s ts text
87 ?X: eval fools metalint
88 ?T: man
89 : Determine locations for other man pages.  For example, programs
90 : should place man4 pages in $prefix/man/$man4 with an extension
91 : of $man4ext.  Use bsd naming conventions.  See mandirstyle.
92 : man1 and man3 are handled separately above.
93 echo "Deducing locations for other man pages for future use."
94 : Deduce man1 and man3 from existing variables.  Keep them for completeness.
95 : This approach preserves an existing SystemV-style
96 : /usr/local/man/l_man/man1 hierarchy.
97 man1=`echo $man1dir | $sed -e "s!$prefix/man/!!"`
98 man3=`echo $man3dir | $sed -e "s!$prefix/man/!!"`
99 for num in 2 4 5 6 7 8; do
100         s=$num
101         case "$mandirstyle" in
102         sysv|svr4)
103                 case "$num" in
104                 4) s='7' ;;
105                 5) s='4' ;;
106                 7) s='5' ;;
107                 8) s='1M' ;;
108                 esac
109                 ;;
110         esac
111         eval "ts=\"\$man${num}\""
112         eval "text=\"\$man${num}ext\""
113         case "$ts" in
114         '') ts=`echo $man1 | $sed -e "s/1/$s/g"` ;;
115         none|$undef) ts=' ' ;;
116         esac
117         case "$text" in
118         '') text=`echo $man1ext | $sed -e "s/1/$s/g"` ;;
119         none|$undef) text=' ' ;;
120         esac
121         : Use extra quotes to preserve an empty ' ' value.
122         eval "man${num}=\"$ts\""
123         eval "man${num}ext=\"$text\""
124 done
125