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. | |
35 | case "\$prefix" in | |
36 | '') prefix='$prefix' ;; | |
37 | esac | |
5f578af9 AD |
38 | case "\$siteprefix" in |
39 | '') siteprefix='$siteprefix' ;; | |
40 | esac | |
41 | case "\$vendorprefix" in | |
42 | '') vendorprefix='$vendorprefix' ;; | |
43 | esac | |
44 | ||
45 | # Where installperl puts things. | |
46 | case "\$installprefix" in | |
47 | '') installprefix='$installprefix' ;; | |
48 | esac | |
85364e4e MB |
49 | |
50 | # Installation directives. Note that each one comes in three flavors. | |
51 | # For example, we have privlib, privlibexp, and installprivlib. | |
52 | # privlib is for private (to perl) library files. | |
c4f23d77 | 53 | # privlibexp is the same, except any '~' the user gave to Configure |
85364e4e | 54 | # is expanded to the user's home directory. This is figured |
dc45a647 | 55 | # out automatically by Configure, so you don't have to include it here. |
85364e4e MB |
56 | # installprivlib is for systems (such as those running AFS) that |
57 | # need to distinguish between the place where things | |
5f578af9 AD |
58 | # get installed and where they finally will reside. As of 5.005_6x, |
59 | # this too is handled automatically by Configure based on | |
60 | # $installprefix, so it isn't included here either. | |
61 | # | |
62 | # See Porting/Glossary for the definitions of these names, and see the | |
63 | # INSTALL file for some examples. | |
dc45a647 MB |
64 | # |
65 | # In each case, if your previous value was the default, leave it commented | |
66 | # out. That way, if you override prefix, all of these will be | |
67 | # automatically adjusted. | |
693762b4 | 68 | # |
3a6175e1 | 69 | # WARNING: Be especially careful about architecture-dependent and |
dc45a647 MB |
70 | # version-dependent names, particularly if you reuse this file for |
71 | # different versions of perl. | |
693762b4 AD |
72 | |
73 | !GROK!THIS! | |
74 | ||
5f578af9 AD |
75 | for var in \ |
76 | bin scriptdir privlib archlib man1dir man3dir html1dir html3dir \ | |
77 | sitebin sitescriptdir sitelib sitearch \ | |
78 | siteman1dir siteman3dir sitehtml1dir sitehtml3dir \ | |
79 | vendorbin vendorscript vendorlib vendorarch \ | |
80 | vendorman1 vendorman3 vendorhtml1 vendorhtml3 | |
81 | do | |
dc45a647 MB |
82 | |
83 | case "$var" in | |
5f578af9 AD |
84 | |
85 | # Directories for the core perl components | |
dc45a647 MB |
86 | bin) dflt=$prefix/bin ;; |
87 | # The scriptdir test is more complex, but this is probably usually ok. | |
c4f23d77 AD |
88 | scriptdir) |
89 | if $test -d $prefix/script; then | |
90 | dflt=$prefix/script | |
91 | else | |
92 | dflt=$bin | |
93 | fi | |
94 | ;; | |
dc45a647 MB |
95 | privlib) |
96 | case "$prefix" in | |
3a6175e1 AD |
97 | *perl*) dflt=$prefix/lib/$version ;; |
98 | *) dflt=$prefix/lib/$package/$version ;; | |
bfb7748a AD |
99 | esac |
100 | ;; | |
5f578af9 AD |
101 | archlib) dflt="$privlib/$archname" ;; |
102 | ||
103 | man1dir) dflt="$prefix/man/man1" ;; | |
104 | man3dir) dflt="$prefix/man/man3" ;; | |
105 | # Can we assume all sed's have greedy matching? | |
106 | man1ext) dflt=`echo $man1dir | sed -e 's!.*man!!' -e 's!^\.!!'` ;; | |
107 | man3ext) dflt=`echo $man3dir | sed -e 's!.*man!!' -e 's!^\.!!'` ;; | |
108 | ||
109 | # We don't know what to do with these yet. | |
110 | html1dir) dflt='' ;; | |
111 | htm31dir) dflt='' ;; | |
112 | ||
113 | # Site-specific add-ons. | |
114 | sitebin) dflt=$siteprefix/bin ;; | |
115 | # The scriptdir test is more complex, but this is probably usually ok. | |
116 | sitescriptdir) | |
117 | if $test -d $siteprefix/script; then | |
118 | dflt=$siteprefix/script | |
119 | else | |
120 | dflt=$sitebin | |
121 | fi | |
bfb7748a AD |
122 | ;; |
123 | sitelib) | |
5f578af9 AD |
124 | case "$siteprefix" in |
125 | *perl*) dflt=$prefix/lib/site_perl ;; | |
126 | *) dflt=$prefix/lib/$package/site_perl ;; | |
dc45a647 MB |
127 | esac |
128 | ;; | |
5f578af9 | 129 | sitearch) dflt="$sitelib/$apiversion/$archname" ;; |
dc45a647 | 130 | |
5f578af9 AD |
131 | siteman1dir) dflt="$siteprefix/man/man1" ;; |
132 | siteman3dir) dflt="$siteprefix/man/man3" ;; | |
133 | # We don't know what to do with these yet. | |
134 | sitehtml1dir) dflt='' ;; | |
135 | sitehtm31dir) dflt='' ;; | |
136 | ||
137 | # Vendor-specific add-ons. These are all usually empty. | |
138 | vendor*) | |
139 | if test X"$vendorprefix" = X""; then | |
140 | dflt='' | |
141 | else | |
142 | case "$var" in | |
143 | vendorbin) dflt=$vendorprefix/bin ;; | |
144 | ||
145 | # The scriptdir test is more complex, | |
146 | # but this is probably usually ok. | |
147 | vendorscriptdir) | |
148 | if $test -d $vendorprefix/script; then | |
149 | dflt=$vendorprefix/script | |
150 | else | |
151 | dflt=$vendorbin | |
152 | fi | |
153 | ;; | |
154 | vendorlib) | |
155 | case "$vendorprefix" in | |
156 | *perl*) dflt=$prefix/lib/vendor_perl ;; | |
157 | *) dflt=$prefix/lib/$package/vendor_perl ;; | |
158 | esac | |
159 | ;; | |
160 | vendorarch) dflt="$vendorlib/$apiversion/$archname" ;; | |
dc45a647 | 161 | |
5f578af9 AD |
162 | vendorman1dir) dflt="$vendorprefix/man/man1" ;; |
163 | vendorman3dir) dflt="$vendorprefix/man/man3" ;; | |
164 | # We don't know what to do with these yet. | |
165 | vendorhtml1dir) dflt='' ;; | |
166 | vendorhtm31dir) dflt='' ;; | |
167 | ||
168 | esac # End of vendorprefix != '' | |
169 | fi | |
170 | ;; | |
dc45a647 MB |
171 | esac |
172 | ||
173 | eval val="\$$var" | |
174 | if test X"$val" = X"$dflt"; then | |
175 | echo "# $var='$dflt'" | |
176 | else | |
177 | echo "# Preserving custom $var" | |
dc45a647 MB |
178 | echo "$var='$val'" |
179 | fi | |
180 | ||
181 | done >> Policy.sh | |
693762b4 AD |
182 | |
183 | $spitshell <<!GROK!THIS! >>Policy.sh | |
184 | ||
dc45a647 | 185 | # Lastly, you may add additional items here. For example, to set the |
693762b4 AD |
186 | # pager to your local favorite value, uncomment the following line in |
187 | # the original Policy_sh.SH file and re-run sh Policy_sh.SH. | |
dc45a647 MB |
188 | # |
189 | # pager='$pager' | |
693762b4 AD |
190 | # |
191 | # A full Glossary of all the config.sh variables is in the file | |
192 | # Porting/Glossary. | |
85364e4e MB |
193 | |
194 | !GROK!THIS! | |
3a6175e1 AD |
195 | |
196 | #Credits: | |
197 | # The original design for this Policy.sh file came from Wayne Davison, | |
198 | # maintainer of trn. | |
199 | # This version for Perl5.004_61 originally written by | |
200 | # Andy Dougherty <doughera@lafcol.lafayette.edu>. | |
201 | # This file may be distributed under the same terms as Perl itself. |