Commit | Line | Data |
---|---|---|
2000072c | 1 | case $CONFIGDOTSH in |
85364e4e MB |
2 | '') . ./config.sh ;; |
3 | esac | |
4 | echo "Extracting Policy.sh (with variable substitutions)" | |
5 | $spitshell <<!GROK!THIS! >Policy.sh | |
6 | $startsh | |
7 | # | |
8 | # This file was produced by running the Policy_sh.SH script, which | |
9 | # gets its values from config.sh, which is generally produced by | |
693762b4 AD |
10 | # running Configure. The Policy.sh file gets overwritten each time |
11 | # Configure is run. Any variables you add to Policy.sh will be lost | |
12 | # unless you copy Policy.sh somewhere else before running Configure. | |
85364e4e MB |
13 | # |
14 | # The idea here is to distill in one place the common site-wide | |
15 | # "policy" answers (such as installation directories) that are | |
dc45a647 | 16 | # to be "sticky". If you keep the file Policy.sh around in |
85364e4e MB |
17 | # the same directory as you are building Perl, then Configure will |
18 | # (by default) load up the Policy.sh file just before the | |
19 | # platform-specific hints file. | |
dc45a647 | 20 | # |
85364e4e | 21 | |
dc45a647 MB |
22 | # Allow Configure command-line overrides; usually these won't be |
23 | # needed, but something like -Dprefix=/test/location can be quite | |
24 | # useful for testing out new versions. | |
85364e4e | 25 | |
dc45a647 | 26 | #Site-specific values: |
85364e4e | 27 | |
dc45a647 MB |
28 | case "\$perladmin" in |
29 | '') perladmin='$perladmin' ;; | |
30 | esac | |
31 | ||
5f578af9 | 32 | # Installation prefixes. Allow a Configure -D override. You |
dc45a647 MB |
33 | # may wish to reinstall perl under a different prefix, perhaps |
34 | # in order to test a different configuration. | |
9e80d8f4 JH |
35 | # For an explanation of the installation directories, see the |
36 | # INSTALL file section on "Installation Directories". | |
dc45a647 MB |
37 | case "\$prefix" in |
38 | '') prefix='$prefix' ;; | |
39 | esac | |
5f578af9 AD |
40 | case "\$siteprefix" in |
41 | '') siteprefix='$siteprefix' ;; | |
42 | esac | |
43 | case "\$vendorprefix" in | |
44 | '') vendorprefix='$vendorprefix' ;; | |
45 | esac | |
46 | ||
47 | # Where installperl puts things. | |
48 | case "\$installprefix" in | |
49 | '') installprefix='$installprefix' ;; | |
50 | esac | |
85364e4e MB |
51 | |
52 | # Installation directives. Note that each one comes in three flavors. | |
53 | # For example, we have privlib, privlibexp, and installprivlib. | |
54 | # privlib is for private (to perl) library files. | |
c4f23d77 | 55 | # privlibexp is the same, except any '~' the user gave to Configure |
85364e4e | 56 | # is expanded to the user's home directory. This is figured |
dc45a647 | 57 | # out automatically by Configure, so you don't have to include it here. |
85364e4e MB |
58 | # installprivlib is for systems (such as those running AFS) that |
59 | # need to distinguish between the place where things | |
5f578af9 AD |
60 | # get installed and where they finally will reside. As of 5.005_6x, |
61 | # this too is handled automatically by Configure based on | |
62 | # $installprefix, so it isn't included here either. | |
63 | # | |
9e80d8f4 JH |
64 | # Note also that there are three broad hierarchies of installation |
65 | # directories, as discussed in the INSTALL file under | |
66 | # "Installation Directories": | |
67 | # | |
68 | # =item Directories for the perl distribution | |
69 | # | |
70 | # =item Directories for site-specific add-on files | |
71 | # | |
72 | # =item Directories for vendor-supplied add-on files | |
73 | # | |
5f578af9 | 74 | # See Porting/Glossary for the definitions of these names, and see the |
9e80d8f4 | 75 | # INSTALL file for further explanation and some examples. |
dc45a647 MB |
76 | # |
77 | # In each case, if your previous value was the default, leave it commented | |
78 | # out. That way, if you override prefix, all of these will be | |
79 | # automatically adjusted. | |
693762b4 | 80 | # |
3a6175e1 | 81 | # WARNING: Be especially careful about architecture-dependent and |
dc45a647 MB |
82 | # version-dependent names, particularly if you reuse this file for |
83 | # different versions of perl. | |
693762b4 AD |
84 | |
85 | !GROK!THIS! | |
86 | ||
5f578af9 AD |
87 | for var in \ |
88 | bin scriptdir privlib archlib man1dir man3dir html1dir html3dir \ | |
49c10eea JH |
89 | sitebin sitescript sitelib sitearch \ |
90 | siteman1 siteman3 sitehtml1 sitehtml3 \ | |
5f578af9 AD |
91 | vendorbin vendorscript vendorlib vendorarch \ |
92 | vendorman1 vendorman3 vendorhtml1 vendorhtml3 | |
93 | do | |
dc45a647 MB |
94 | |
95 | case "$var" in | |
5f578af9 AD |
96 | |
97 | # Directories for the core perl components | |
dc45a647 MB |
98 | bin) dflt=$prefix/bin ;; |
99 | # The scriptdir test is more complex, but this is probably usually ok. | |
c4f23d77 AD |
100 | scriptdir) |
101 | if $test -d $prefix/script; then | |
102 | dflt=$prefix/script | |
103 | else | |
104 | dflt=$bin | |
105 | fi | |
106 | ;; | |
dc45a647 MB |
107 | privlib) |
108 | case "$prefix" in | |
3a6175e1 AD |
109 | *perl*) dflt=$prefix/lib/$version ;; |
110 | *) dflt=$prefix/lib/$package/$version ;; | |
bfb7748a AD |
111 | esac |
112 | ;; | |
5f578af9 AD |
113 | archlib) dflt="$privlib/$archname" ;; |
114 | ||
115 | man1dir) dflt="$prefix/man/man1" ;; | |
116 | man3dir) dflt="$prefix/man/man3" ;; | |
117 | # Can we assume all sed's have greedy matching? | |
118 | man1ext) dflt=`echo $man1dir | sed -e 's!.*man!!' -e 's!^\.!!'` ;; | |
119 | man3ext) dflt=`echo $man3dir | sed -e 's!.*man!!' -e 's!^\.!!'` ;; | |
120 | ||
121 | # We don't know what to do with these yet. | |
122 | html1dir) dflt='' ;; | |
123 | htm31dir) dflt='' ;; | |
124 | ||
9e80d8f4 | 125 | # Directories for site-specific add-on files |
5f578af9 | 126 | sitebin) dflt=$siteprefix/bin ;; |
49c10eea | 127 | sitescript) |
5f578af9 AD |
128 | if $test -d $siteprefix/script; then |
129 | dflt=$siteprefix/script | |
130 | else | |
131 | dflt=$sitebin | |
132 | fi | |
bfb7748a AD |
133 | ;; |
134 | sitelib) | |
5f578af9 | 135 | case "$siteprefix" in |
ba04bae9 JH |
136 | *perl*) dflt=$prefix/lib/site_perl/$version ;; |
137 | *) dflt=$prefix/lib/$package/site_perl/$version ;; | |
dc45a647 MB |
138 | esac |
139 | ;; | |
ba04bae9 | 140 | sitearch) dflt="$sitelib/$archname" ;; |
dc45a647 | 141 | |
49c10eea JH |
142 | siteman1) dflt="$siteprefix/man/man1" ;; |
143 | siteman3) dflt="$siteprefix/man/man3" ;; | |
5f578af9 | 144 | # We don't know what to do with these yet. |
49c10eea | 145 | sitehtml1) dflt='' ;; |
5f578af9 AD |
146 | sitehtm31dir) dflt='' ;; |
147 | ||
9e80d8f4 JH |
148 | # Directories for vendor-supplied add-on files |
149 | # These are all usually empty. | |
5f578af9 AD |
150 | vendor*) |
151 | if test X"$vendorprefix" = X""; then | |
152 | dflt='' | |
153 | else | |
154 | case "$var" in | |
155 | vendorbin) dflt=$vendorprefix/bin ;; | |
49c10eea | 156 | vendorscript) |
5f578af9 AD |
157 | if $test -d $vendorprefix/script; then |
158 | dflt=$vendorprefix/script | |
159 | else | |
160 | dflt=$vendorbin | |
161 | fi | |
162 | ;; | |
163 | vendorlib) | |
164 | case "$vendorprefix" in | |
ba04bae9 JH |
165 | *perl*) dflt=$prefix/lib/vendor_perl/$version ;; |
166 | *) dflt=$prefix/lib/$package/vendor_perl/$version ;; | |
5f578af9 AD |
167 | esac |
168 | ;; | |
ba04bae9 | 169 | vendorarch) dflt="$vendorlib/$archname" ;; |
dc45a647 | 170 | |
49c10eea JH |
171 | vendorman1) dflt="$vendorprefix/man/man1" ;; |
172 | vendorman3) dflt="$vendorprefix/man/man3" ;; | |
5f578af9 | 173 | # We don't know what to do with these yet. |
49c10eea JH |
174 | vendorhtml1) dflt='' ;; |
175 | vendorhtm3) dflt='' ;; | |
5f578af9 AD |
176 | |
177 | esac # End of vendorprefix != '' | |
178 | fi | |
179 | ;; | |
dc45a647 MB |
180 | esac |
181 | ||
182 | eval val="\$$var" | |
183 | if test X"$val" = X"$dflt"; then | |
184 | echo "# $var='$dflt'" | |
185 | else | |
186 | echo "# Preserving custom $var" | |
dc45a647 MB |
187 | echo "$var='$val'" |
188 | fi | |
189 | ||
190 | done >> Policy.sh | |
693762b4 AD |
191 | |
192 | $spitshell <<!GROK!THIS! >>Policy.sh | |
193 | ||
dc45a647 | 194 | # Lastly, you may add additional items here. For example, to set the |
693762b4 AD |
195 | # pager to your local favorite value, uncomment the following line in |
196 | # the original Policy_sh.SH file and re-run sh Policy_sh.SH. | |
dc45a647 MB |
197 | # |
198 | # pager='$pager' | |
693762b4 AD |
199 | # |
200 | # A full Glossary of all the config.sh variables is in the file | |
201 | # Porting/Glossary. | |
85364e4e MB |
202 | |
203 | !GROK!THIS! | |
3a6175e1 AD |
204 | |
205 | #Credits: | |
206 | # The original design for this Policy.sh file came from Wayne Davison, | |
207 | # maintainer of trn. | |
208 | # This version for Perl5.004_61 originally written by | |
9e80d8f4 | 209 | # Andy Dougherty <doughera@lafayette.edu>. |
3a6175e1 | 210 | # This file may be distributed under the same terms as Perl itself. |