X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=installperl;h=c717750c50070a78d9371d4dd1acfcdb6ca07358;hb=7ee5fac837a8a4ebf1956da1b1d252aa82fe506d;hp=54e657826fc39efa397b7b3fb96f2de7e465ec69;hpb=9e6fc21fcd859351f86785f40b58d1227720bc0b;p=p5sagit%2Fp5-mst-13.2.git diff --git a/installperl b/installperl index 54e6578..c717750 100755 --- a/installperl +++ b/installperl @@ -1,4 +1,4 @@ -#!./perl +#!./perl -w BEGIN { require 5.004; @@ -6,7 +6,7 @@ BEGIN { @INC = 'lib'; $ENV{PERL5LIB} = 'lib'; - # This needs to be at BEGIN time, before the use Config; below. + # This needs to be at BEGIN time, before any use of Config require './install_lib.pl'; } @@ -15,6 +15,8 @@ use vars qw($Is_VMS $Is_W32 $Is_OS2 $Is_Cygwin $Is_Darwin $Is_NetWare %opts $packlist); my ($dostrip, $versiononly, $force, $otherperls, $archname, $nwinstall, $nopods); +# Not sure how easy it would be to refactor to remove the need for local $depth +# below use vars qw /$depth/; BEGIN { @@ -43,7 +45,7 @@ sub mkpath { my $mainperldir = "/usr/bin"; my $exe_ext = $Config{exe_ext}; -# Allow ``make install PERLNAME=something_besides_perl'': +# Allow "make install PERLNAME=something_besides_perl": my $perl = defined($ENV{PERLNAME}) ? $ENV{PERLNAME} : 'perl'; # This is the base used for versioned names, like "perl5.6.0". @@ -65,6 +67,8 @@ if ( $Is_VMS ) { } $otherperls = 1; +# Consider refactoring this to use Getopt::Long once Getopt::Long's planned +# feature is implemented, to distinguish + and - options. while (@ARGV) { $opts{notify} = 1 if $ARGV[0] eq '-n'; $dostrip = 1 if $ARGV[0] eq '-s'; @@ -249,11 +253,8 @@ if (($Is_W32 and ! $Is_NetWare) or $Is_Cygwin) { if ($Is_Cygwin) { $perldll = $libperl; - my $v_e_r_s = substr($ver,0,-2); $v_e_r_s =~ tr/./_/; - $perldll =~ s/(\..*)?$/$v_e_r_s.$dlext/; - $perldll =~ s/^lib/cyg/; } else { - $perldll = 'perl511.' . $dlext; + $perldll = 'perl5'.$Config{patchlevel}.'.'.$dlext; } if ($dlsrc ne "dl_none.xs") { @@ -334,7 +335,7 @@ if ($d_dosuid) { # Install library files. my ($do_installarchlib, $do_installprivlib) = (0, 0); -my $vershort = $Is_Cygwin ? substr($ver,0,-2) : $ver; +my $vershort = ($Is_Cygwin and !$Config{usedevel}) ? substr($ver,0,-2) : $ver; mkpath($installprivlib, $opts{verbose}, 0777); mkpath($installarchlib, $opts{verbose}, 0777);