From: Andy Dougherty Date: Fri, 22 Oct 1999 16:47:34 +0000 (-0400) Subject: Update Policy_sh.SH to handle the newer installation directives. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5f578af9ed931912d211ccaae577f6fd38c9baea;p=p5sagit%2Fp5-mst-13.2.git Update Policy_sh.SH to handle the newer installation directives. To: Perl Porters Subject: [PATCH 5.005_62] Policy_sh.SH update Message-ID: p4raw-id: //depot/cfgperl@4423 --- diff --git a/Policy_sh.SH b/Policy_sh.SH index 3008843..133a9fa 100644 --- a/Policy_sh.SH +++ b/Policy_sh.SH @@ -29,12 +29,23 @@ case "\$perladmin" in '') perladmin='$perladmin' ;; esac -# Installation prefix. Allow a Configure -D override. You +# Installation prefixes. Allow a Configure -D override. You # may wish to reinstall perl under a different prefix, perhaps # in order to test a different configuration. case "\$prefix" in '') prefix='$prefix' ;; esac +case "\$siteprefix" in +'') siteprefix='$siteprefix' ;; +esac +case "\$vendorprefix" in +'') vendorprefix='$vendorprefix' ;; +esac + +# Where installperl puts things. +case "\$installprefix" in +'') installprefix='$installprefix' ;; +esac # Installation directives. Note that each one comes in three flavors. # For example, we have privlib, privlibexp, and installprivlib. @@ -44,7 +55,12 @@ esac # out automatically by Configure, so you don't have to include it here. # installprivlib is for systems (such as those running AFS) that # need to distinguish between the place where things -# get installed and where they finally will reside. +# get installed and where they finally will reside. As of 5.005_6x, +# this too is handled automatically by Configure based on +# $installprefix, so it isn't included here either. +# +# See Porting/Glossary for the definitions of these names, and see the +# INSTALL file for some examples. # # In each case, if your previous value was the default, leave it commented # out. That way, if you override prefix, all of these will be @@ -56,13 +72,17 @@ esac !GROK!THIS! -for var in bin scriptdir privlib archlib \ - man1dir man3dir sitelib sitearch \ - installbin installscript installprivlib installarchlib \ - installman1dir installman3dir installsitelib installsitearch \ - man1ext man3ext; do +for var in \ + bin scriptdir privlib archlib man1dir man3dir html1dir html3dir \ + sitebin sitescriptdir sitelib sitearch \ + siteman1dir siteman3dir sitehtml1dir sitehtml3dir \ + vendorbin vendorscript vendorlib vendorarch \ + vendorman1 vendorman3 vendorhtml1 vendorhtml3 +do case "$var" in + + # Directories for the core perl components bin) dflt=$prefix/bin ;; # The scriptdir test is more complex, but this is probably usually ok. scriptdir) @@ -78,47 +98,76 @@ for var in bin scriptdir privlib archlib \ *) dflt=$prefix/lib/$package/$version ;; esac ;; - archlib) - case "$prefix" in - *perl*) dflt=$prefix/lib/$version/$archname ;; - *) dflt=$prefix/lib/$package/$version/$archname ;; - esac + archlib) dflt="$privlib/$archname" ;; + + man1dir) dflt="$prefix/man/man1" ;; + man3dir) dflt="$prefix/man/man3" ;; + # Can we assume all sed's have greedy matching? + man1ext) dflt=`echo $man1dir | sed -e 's!.*man!!' -e 's!^\.!!'` ;; + man3ext) dflt=`echo $man3dir | sed -e 's!.*man!!' -e 's!^\.!!'` ;; + + # We don't know what to do with these yet. + html1dir) dflt='' ;; + htm31dir) dflt='' ;; + + # Site-specific add-ons. + sitebin) dflt=$siteprefix/bin ;; + # The scriptdir test is more complex, but this is probably usually ok. + sitescriptdir) + if $test -d $siteprefix/script; then + dflt=$siteprefix/script + else + dflt=$sitebin + fi ;; sitelib) - case "$prefix" in - *perl*) dflt=$prefix/lib/site_perl/$apiversion ;; - *) dflt=$prefix/lib/$package/site_perl/$apiversion ;; - esac - ;; - sitearch) - case "$prefix" in - *perl*) dflt=$prefix/lib/site_perl/$apiversion/$archname ;; - *) dflt=$prefix/lib/$package/site_perl/$apiversion/$archname ;; - esac - ;; - man1dir) dflt="$prefix/man/man1" ;; - man3dir) - case "$prefix" in - *perl*) dflt=`echo $man1dir | - sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'` ;; - *) dflt=$privlib/man/man3 ;; + case "$siteprefix" in + *perl*) dflt=$prefix/lib/site_perl ;; + *) dflt=$prefix/lib/$package/site_perl ;; esac ;; + sitearch) dflt="$sitelib/$apiversion/$archname" ;; - # Can we assume all sed's have greedy matching? - man1ext) dflt=`echo $man1dir | sed -e 's!.*man!!' -e 's!^\.!!'` ;; - man3ext) dflt=`echo $man3dir | sed -e 's!.*man!!' -e 's!^\.!!'` ;; + siteman1dir) dflt="$siteprefix/man/man1" ;; + siteman3dir) dflt="$siteprefix/man/man3" ;; + # We don't know what to do with these yet. + sitehtml1dir) dflt='' ;; + sitehtm31dir) dflt='' ;; + + # Vendor-specific add-ons. These are all usually empty. + vendor*) + if test X"$vendorprefix" = X""; then + dflt='' + else + case "$var" in + vendorbin) dflt=$vendorprefix/bin ;; + + # The scriptdir test is more complex, + # but this is probably usually ok. + vendorscriptdir) + if $test -d $vendorprefix/script; then + dflt=$vendorprefix/script + else + dflt=$vendorbin + fi + ;; + vendorlib) + case "$vendorprefix" in + *perl*) dflt=$prefix/lib/vendor_perl ;; + *) dflt=$prefix/lib/$package/vendor_perl ;; + esac + ;; + vendorarch) dflt="$vendorlib/$apiversion/$archname" ;; - # It might be possible to fool these next tests. Please let - # me know if they don't work right for you. - installbin) dflt=`echo $binexp | sed 's#^/afs/#/afs/.#'`;; - installscript) dflt=`echo $scriptdirexp | sed 's#^/afs/#/afs/.#'`;; - installprivlib) dflt=`echo $privlibexp | sed 's#^/afs/#/afs/.#'`;; - installarchlib) dflt=`echo $archlibexp | sed 's#^/afs/#/afs/.#'`;; - installsitelib) dflt=`echo $sitelibexp | sed 's#^/afs/#/afs/.#'`;; - installsitearch) dflt=`echo $sitearchexp | sed 's#^/afs/#/afs/.#'`;; - installman1dir) dflt=`echo $man1direxp | sed 's#^/afs/#/afs/.#'`;; - installman3dir) dflt=`echo $man3direxp | sed 's#^/afs/#/afs/.#'`;; + vendorman1dir) dflt="$vendorprefix/man/man1" ;; + vendorman3dir) dflt="$vendorprefix/man/man3" ;; + # We don't know what to do with these yet. + vendorhtml1dir) dflt='' ;; + vendorhtm31dir) dflt='' ;; + + esac # End of vendorprefix != '' + fi + ;; esac eval val="\$$var" @@ -150,4 +199,3 @@ $spitshell <>Policy.sh # This version for Perl5.004_61 originally written by # Andy Dougherty . # This file may be distributed under the same terms as Perl itself. -