4 echo "Extracting Policy.sh (with variable substitutions)"
5 $spitshell <<!GROK!THIS! >Policy.sh
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
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.
14 # The idea here is to distill in one place the common site-wide
15 # "policy" answers (such as installation directories) that are
16 # to be "sticky". If you keep the file Policy.sh around in
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.
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.
26 #Site-specific values:
29 '') perladmin='$perladmin' ;;
32 # Installation prefixes. Allow a Configure -D override. You
33 # may wish to reinstall perl under a different prefix, perhaps
34 # in order to test a different configuration.
35 # For an explanation of the installation directories, see the
36 # INSTALL file section on "Installation Directories".
38 '') prefix='$prefix' ;;
40 case "\$siteprefix" in
41 '') siteprefix='$siteprefix' ;;
43 case "\$vendorprefix" in
44 '') vendorprefix='$vendorprefix' ;;
47 # Where installperl puts things.
48 case "\$installprefix" in
49 '') installprefix='$installprefix' ;;
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.
55 # privlibexp is the same, except any '~' the user gave to Configure
56 # is expanded to the user's home directory. This is figured
57 # out automatically by Configure, so you don't have to include it here.
58 # installprivlib is for systems (such as those running AFS) that
59 # need to distinguish between the place where things
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.
64 # Note also that there are three broad hierarchies of installation
65 # directories, as discussed in the INSTALL file under
66 # "Installation Directories":
68 # =item Directories for the perl distribution
70 # =item Directories for site-specific add-on files
72 # =item Directories for vendor-supplied add-on files
74 # See Porting/Glossary for the definitions of these names, and see the
75 # INSTALL file for further explanation and some examples.
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.
81 # WARNING: Be especially careful about architecture-dependent and
82 # version-dependent names, particularly if you reuse this file for
83 # different versions of perl.
88 bin scriptdir privlib archlib man1dir man3dir html1dir html3dir \
89 sitebin sitescriptdir sitelib sitearch \
90 siteman1dir siteman3dir sitehtml1dir sitehtml3dir \
91 vendorbin vendorscript vendorlib vendorarch \
92 vendorman1 vendorman3 vendorhtml1 vendorhtml3
97 # Directories for the core perl components
98 bin) dflt=$prefix/bin ;;
99 # The scriptdir test is more complex, but this is probably usually ok.
101 if $test -d $prefix/script; then
109 *perl*) dflt=$prefix/lib/$version ;;
110 *) dflt=$prefix/lib/$package/$version ;;
113 archlib) dflt="$privlib/$archname" ;;
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!^\.!!'` ;;
121 # We don't know what to do with these yet.
125 # Directories for site-specific add-on files
126 sitebin) dflt=$siteprefix/bin ;;
127 # The scriptdir test is more complex, but this is probably usually ok.
129 if $test -d $siteprefix/script; then
130 dflt=$siteprefix/script
136 case "$siteprefix" in
137 *perl*) dflt=$prefix/lib/site_perl/$version ;;
138 *) dflt=$prefix/lib/$package/site_perl/$version ;;
141 sitearch) dflt="$sitelib/$archname" ;;
143 siteman1dir) dflt="$siteprefix/man/man1" ;;
144 siteman3dir) dflt="$siteprefix/man/man3" ;;
145 # We don't know what to do with these yet.
146 sitehtml1dir) dflt='' ;;
147 sitehtm31dir) dflt='' ;;
149 # Directories for vendor-supplied add-on files
150 # These are all usually empty.
152 if test X"$vendorprefix" = X""; then
156 vendorbin) dflt=$vendorprefix/bin ;;
158 # The scriptdir test is more complex,
159 # but this is probably usually ok.
161 if $test -d $vendorprefix/script; then
162 dflt=$vendorprefix/script
168 case "$vendorprefix" in
169 *perl*) dflt=$prefix/lib/vendor_perl/$version ;;
170 *) dflt=$prefix/lib/$package/vendor_perl/$version ;;
173 vendorarch) dflt="$vendorlib/$archname" ;;
175 vendorman1dir) dflt="$vendorprefix/man/man1" ;;
176 vendorman3dir) dflt="$vendorprefix/man/man3" ;;
177 # We don't know what to do with these yet.
178 vendorhtml1dir) dflt='' ;;
179 vendorhtm31dir) dflt='' ;;
181 esac # End of vendorprefix != ''
187 if test X"$val" = X"$dflt"; then
188 echo "# $var='$dflt'"
190 echo "# Preserving custom $var"
196 $spitshell <<!GROK!THIS! >>Policy.sh
198 # Lastly, you may add additional items here. For example, to set the
199 # pager to your local favorite value, uncomment the following line in
200 # the original Policy_sh.SH file and re-run sh Policy_sh.SH.
204 # A full Glossary of all the config.sh variables is in the file
210 # The original design for this Policy.sh file came from Wayne Davison,
212 # This version for Perl5.004_61 originally written by
213 # Andy Dougherty <doughera@lafayette.edu>.
214 # This file may be distributed under the same terms as Perl itself.