X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=installperl;h=0ce39bf73ae99578d4c066a4bb42b9b39aff1cf5;hb=606932feba6a7c07d368ce4e766975b0fe622bfc;hp=ef310c9189576c002d296b3079ef6a8fca7423b1;hpb=c2cd2081a61a1066b00f33319d956e6e3b6d0719;p=p5sagit%2Fp5-mst-13.2.git diff --git a/installperl b/installperl index ef310c9..0ce39bf 100755 --- a/installperl +++ b/installperl @@ -1,13 +1,16 @@ #!./perl -use strict; -use vars qw($Is_VMS $Is_W32 $Is_OS2 $nonono $versiononly $depth); - BEGIN { require 5.004; chdir '..' if !-d 'lib' and -d '..\lib'; @INC = 'lib'; $ENV{PERL5LIB} = 'lib'; +} + +use strict; +use vars qw($Is_VMS $Is_W32 $Is_OS2 $nonono $versiononly $depth); + +BEGIN { $Is_VMS = $^O eq 'VMS'; $Is_W32 = $^O eq 'MSWin32'; $Is_OS2 = $^O eq 'os2'; @@ -156,11 +159,22 @@ if ($Is_VMS) { copy("perlshr$exe_ext", "$installbin/${perl}shr$exe_ext"); chmod(0755, "$installbin/${perl}shr$exe_ext"); } +elsif ($^O eq 'mpeix') { + # MPE lacks hard links and requires that executables with special + # capabilities reside in the MPE namespace. + safe_unlink("$installbin/perl$ver$exe_ext", $Config{perlpath}); + # Install the primary executable into the MPE namespace as perlpath. + copy("perl$exe_ext", $Config{perlpath}); + chmod(0755, $Config{perlpath}); + # Create a backup copy with the version number. + link($Config{perlpath}, "$installbin/perl$ver$exe_ext"); +} elsif ($^O ne 'dos') { safe_unlink("$installbin/$perl$ver$exe_ext"); copy("perl$exe_ext", "$installbin/$perl$ver$exe_ext"); chmod(0755, "$installbin/$perl$ver$exe_ext"); -} else { +} +else { safe_unlink("$installbin/$perl.exe"); copy("perl.exe", "$installbin/$perl.exe"); } @@ -222,7 +236,13 @@ foreach my $file (@corefiles) { if (! $versiononly && ! samepath($installbin, '.') && ($^O ne 'dos') && ! $Is_VMS) { safe_unlink("$installbin/$perl$exe_ext", "$installbin/suid$perl$exe_ext"); - link("$installbin/$perl$ver$exe_ext", "$installbin/$perl$exe_ext"); + if ($^O eq 'mpeix') { + # MPE doesn't support hard links, so use a symlink. + # We don't want another cloned copy. + symlink($Config{perlpath}, "$installbin/perl$exe_ext"); + } else { + link("$installbin/$perl$ver$exe_ext", "$installbin/$perl$exe_ext"); + } link("$installbin/s$perl$ver$exe_ext", "$installbin/suid$perl$exe_ext") if $d_dosuid; } @@ -253,11 +273,13 @@ if (!$versiononly && !$nonono && !$Is_W32 && !$Is_VMS && -t STDIN && -t STDERR (yn("Many scripts expect perl to be installed as $usrbinperl.\n" . "Do you wish to have $usrbinperl be the same as\n" . "$expinstperl? [y] "))) - { + { unlink($usrbinperl); - eval { CORE::link $instperl, $usrbinperl } || - eval { symlink $expinstperl, $usrbinperl } || - copy($instperl, $usrbinperl); + ( $Config{'d_link'} eq 'define' && + eval { CORE::link $instperl, $usrbinperl } ) || + eval { symlink $expinstperl, $usrbinperl } || + copy($instperl, $usrbinperl); + $mainperl_is_instperl = 1; } } @@ -542,8 +564,6 @@ sub installlib { and chmod($name =~ /\.(so|$dlext)$/o ? 0555 : 0444, "$installlib/$name"); } - } elsif (-d $_) { - mkpath("$installlib/$name", 1, 0777); } }