X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=installperl;h=7a555fbe278e21884bae31e073d1371b811fec55;hb=0a6b11f8fedc4bae957f03efab3ecb64338ce939;hp=8bb8d1439c5ad8f8220de6769e88d4dbf3bf6a82;hpb=a29d2910a363e5b308f0e74eda4c093080b7afbd;p=p5sagit%2Fp5-mst-13.2.git diff --git a/installperl b/installperl index 8bb8d14..7a555fb 100755 --- a/installperl +++ b/installperl @@ -159,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"); } @@ -209,6 +220,11 @@ else { @corefiles = <*.h libperl*.*>; # AIX needs perl.exp installed as well. push(@corefiles,'perl.exp') if $^O eq 'aix'; + if ($^O eq 'mpeix') { + # MPE needs mpeixish.h installed as well. + mkpath("$installarchlib/CORE/mpeix", 1, 0777); + push(@corefiles,'mpeix/mpeixish.h'); + } # If they have built sperl.o... push(@corefiles,'sperl.o') if -f 'sperl.o'; } @@ -225,7 +241,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; } @@ -256,11 +278,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; } } @@ -308,7 +332,7 @@ if (! $versiononly) { # Install pod pages. Where? I guess in $installprivlib/pod. -if (! $versiononly || !($installprivlib =~ m/\Q$]/)) { +unless ( $versiononly && !($installprivlib =~ m/\Q$]/)) { mkpath("${installprivlib}/pod", 1, 0777); # If Perl 5.003's perldiag.pod is there, rename it. @@ -545,8 +569,6 @@ sub installlib { and chmod($name =~ /\.(so|$dlext)$/o ? 0555 : 0444, "$installlib/$name"); } - } elsif (-d $_) { - mkpath("$installlib/$name", 1, 0777); } }