summaryrefslogtreecommitdiff
path: root/installperl
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-05-18 09:40:58 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-05-18 09:40:58 +0000
commit3666098248b43282bda1153dae2f4c1e4af38d09 (patch)
tree9c69a323f89cdd81b231dc630b0eaf134225da7a /installperl
parent9e6b2b00f0190751b970ece3db7033405cb08ca5 (diff)
parentd2719217c9b7910115cef7ea0c16d68e6b286cf7 (diff)
downloadperl-3666098248b43282bda1153dae2f4c1e4af38d09.tar.gz
[asperl] integrate mainline changes (untested)
p4raw-id: //depot/asperl@1010
Diffstat (limited to 'installperl')
-rwxr-xr-xinstallperl63
1 files changed, 37 insertions, 26 deletions
diff --git a/installperl b/installperl
index 07be34188f..3ec0f50063 100755
--- a/installperl
+++ b/installperl
@@ -26,6 +26,9 @@ sub mkpath {
$mainperldir = "/usr/bin";
$exe_ext = $Config{exe_ext};
+# Allow ``make install PERLNAME=something_besides_perl'':
+$perl = defined($ENV{PERLNAME}) ? $ENV{PERLNAME} : 'perl';
+
while (@ARGV) {
$nonono = 1 if $ARGV[0] eq '-n';
$versiononly = 1 if $ARGV[0] eq '-v';
@@ -35,21 +38,29 @@ while (@ARGV) {
umask 022 unless $Is_VMS;
@scripts = qw( utils/c2ph utils/h2ph utils/h2xs
- utils/perlbug utils/perldoc utils/pl2pm utils/splain
- x2p/s2p x2p/find2perl
+ utils/perlbug utils/perldoc utils/pl2pm utils/splain utils/perlcc
+ x2p/s2p x2p/find2perl
pod/pod2man pod/pod2html pod/pod2latex pod/pod2text);
if ($Is_VMS) { @scripts = map { "$_.Com" } @scripts; }
@pods = (<pod/*.pod>);
-%archpms = (Config => 1, FileHandle => 1, overload => 1);
+%archpms = (
+ Config => 1, FileHandle => 1, overload => 1,
+ 'File/Basename' => 1, # uses m//t
+);
if ($^O eq 'dos') {
push(@scripts,'djgpp/fixpmain');
$archpms{config} = $archpms{filehand} = 1;
}
+if ((-e "testcompile") && (defined($ENV{'COMPILE'})))
+{
+ push(@scripts, map("$_.exe", @scripts));
+}
+
find(sub {
if ("$File::Find::dir/$_" =~ m{^ext/[^/]+/(.*)\.pm$}) {
(my $pm = $1) =~ s{^lib/}{};
@@ -126,26 +137,26 @@ $packlist = ExtUtils::Packlist->new("$installarchlib/.packlist");
# First we install the version-numbered executables.
if ($Is_VMS) {
- safe_unlink("$installbin/perl$exe_ext");
- copy("perl$exe_ext", "$installbin/perl$exe_ext");
- chmod(0755, "$installbin/perl$exe_ext");
- safe_unlink("$installbin/perlshr$exe_ext");
- copy("perlshr$exe_ext", "$installbin/perlshr$exe_ext");
- chmod(0755, "$installbin/perlshr$exe_ext");
+ safe_unlink("$installbin/$perl$exe_ext");
+ copy("perl$exe_ext", "$installbin/$perl$exe_ext");
+ chmod(0755, "$installbin/$perl$exe_ext");
+ safe_unlink("$installbin/${perl}shr$exe_ext");
+ copy("perlshr$exe_ext", "$installbin/${perl}shr$exe_ext");
+ chmod(0755, "$installbin/${perl}shr$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");
+ safe_unlink("$installbin/$perl$ver$exe_ext");
+ copy("perl$exe_ext", "$installbin/$perl$ver$exe_ext");
+ chmod(0755, "$installbin/$perl$ver$exe_ext");
} else {
- safe_unlink("$installbin/perl.exe");
- copy("perl.exe", "$installbin/perl.exe");
+ safe_unlink("$installbin/$perl.exe");
+ copy("perl.exe", "$installbin/$perl.exe");
}
-safe_unlink("$installbin/sperl$ver$exe_ext");
+safe_unlink("$installbin/s$perl$ver$exe_ext");
if ($d_dosuid) {
- copy("suidperl$exe_ext", "$installbin/sperl$ver$exe_ext");
- chmod(04711, "$installbin/sperl$ver$exe_ext");
+ copy("suidperl$exe_ext", "$installbin/s$perl$ver$exe_ext");
+ chmod(04711, "$installbin/s$perl$ver$exe_ext");
}
# Install library files.
@@ -197,9 +208,9 @@ foreach $file (@corefiles) {
# Make links to ordinary names if installbin directory isn't current directory.
if (! $versiononly && ! samepath($installbin, '.') && ($^O ne 'dos') && ! $Is_VMS) {
- safe_unlink("$installbin/perl$exe_ext", "$installbin/suidperl$exe_ext");
- link("$installbin/perl$ver$exe_ext", "$installbin/perl$exe_ext");
- link("$installbin/sperl$ver$exe_ext", "$installbin/suidperl$exe_ext")
+ safe_unlink("$installbin/$perl$exe_ext", "$installbin/suid$perl$exe_ext");
+ 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;
}
@@ -209,9 +220,9 @@ $mainperl_is_instperl = 0;
if (!$versiononly && !$nonono && $^O ne 'MSWin32' && !$Is_VMS && -t STDIN && -t STDERR
&& -w $mainperldir && ! samepath($mainperldir, $installbin)) {
- local($usrbinperl) = "$mainperldir/perl$exe_ext";
- local($instperl) = "$installbin/perl$exe_ext";
- local($expinstperl) = "$binexp/perl$exe_ext";
+ local($usrbinperl) = "$mainperldir/$perl$exe_ext";
+ local($instperl) = "$installbin/$perl$exe_ext";
+ local($expinstperl) = "$binexp/$perl$exe_ext";
# First make sure $usrbinperl is not already the same as the perl we
# just installed.
@@ -341,11 +352,11 @@ if (!$versiononly) {
# to $mainperldir (like SunOS)
next if samepath($_, $binexp);
next if ($mainperl_is_instperl && samepath($_, $mainperldir));
- push(@otherperls, "$_/perl$exe_ext")
- if (-x "$_/perl$exe_ext" && ! -d "$_/perl$exe_ext");
+ push(@otherperls, "$_/$perl$exe_ext")
+ if (-x "$_/$perl$exe_ext" && ! -d "$_/$perl$exe_ext");
}
if (@otherperls) {
- print STDERR "\nWarning: perl appears in your path in the following " .
+ print STDERR "\nWarning: $perl appears in your path in the following " .
"locations beyond where\nwe just installed it:\n";
for (@otherperls) {
print STDERR " ", $_, "\n";