-use vars qw($Is_VMS $Is_W32 $Is_OS2 $Is_Cygwin $nonono $dostrip $versiononly $depth);
+my ($Is_VMS, $Is_W32, $Is_OS2, $Is_Cygwin, $nonono, $dostrip,
+ $versiononly, $silent, $verbose, $otherperls);
+use vars qw /$depth/;
while (@ARGV) {
$nonono = 1 if $ARGV[0] eq '-n';
$dostrip = 1 if $ARGV[0] eq '-s';
$versiononly = 1 if $ARGV[0] eq '-v';
while (@ARGV) {
$nonono = 1 if $ARGV[0] eq '-n';
$dostrip = 1 if $ARGV[0] eq '-s';
$versiononly = 1 if $ARGV[0] eq '-v';
my @scripts = qw(utils/c2ph utils/h2ph utils/h2xs utils/perlbug utils/perldoc
utils/pl2pm utils/splain utils/perlcc utils/dprofpp
x2p/s2p x2p/find2perl
my @scripts = qw(utils/c2ph utils/h2ph utils/h2xs utils/perlbug utils/perldoc
utils/pl2pm utils/splain utils/perlcc utils/dprofpp
x2p/s2p x2p/find2perl
my $patchlevel = substr($],3,2);
die "Patchlevel of perl ($patchlevel)",
"and patchlevel of config.sh ($Config{'PERL_VERSION'}) don't match\n"
my $patchlevel = substr($],3,2);
die "Patchlevel of perl ($patchlevel)",
"and patchlevel of config.sh ($Config{'PERL_VERSION'}) don't match\n"
if ($d_dosuid && $>) { die "You must run as root to install suidperl\n"; }
$installbin || die "No installbin directory in config.sh\n";
if ($d_dosuid && $>) { die "You must run as root to install suidperl\n"; }
$installbin || die "No installbin directory in config.sh\n";
-d $installbin || $nonono || die "$installbin is not a directory\n";
-w $installbin || $nonono || die "$installbin is not writable by you\n"
unless $installbin =~ m#^/afs/# || $nonono;
-d $installbin || $nonono || die "$installbin is not a directory\n";
-w $installbin || $nonono || die "$installbin is not writable by you\n"
unless $installbin =~ m#^/afs/# || $nonono;
-x 'perl' . $exe_ext || die "perl isn't executable!\n";
-x 'suidperl' . $exe_ext|| die "suidperl isn't executable!\n" if $d_dosuid;
-x 'perl' . $exe_ext || die "perl isn't executable!\n";
-x 'suidperl' . $exe_ext|| die "suidperl isn't executable!\n" if $d_dosuid;
--x 't/TEST' || $Is_W32
- || warn "WARNING: You've never run 'make test'!!!",
- " (Installing anyway.)\n";
+-f 't/rantests' || $Is_W32
+ || warn "WARNING: You've never run 'make test' or",
+ " some tests failed! (Installing anyway.)\n";
-if ($Is_Cygwin) {
- $perldll = $libperl;
- $perldll =~ s/(\..*)?$/.$dlext/;
- if ($Config{useshrplib} eq 'true') {
- # install ld2 and perlld as well
- foreach ('ld2', 'perlld') {
- safe_unlink("$installbin/$_");
- copy("$_", "$installbin/$_");
- chmod(0755, "$installbin/$_");
+ if ($Is_Cygwin) {
+ $perldll = $libperl;
+ $perldll =~ s/(\..*)?$/.$dlext/;
+ if ($Config{useshrplib} eq 'true') {
+ # install ld2 and perlld as well
+ foreach ('ld2', 'perlld') {
+ safe_unlink("$installbin/$_");
+ copy("$_", "$installbin/$_");
+ chmod(0755, "$installbin/$_");
+ };
- };
-} else {
- $perldll = 'perl56.' . $dlext;
-}
-
- if ($dlsrc ne "dl_none.xs") {
- -f $perldll || die "No perl DLL built\n";
- }
-# Install the DLL
-
- safe_unlink("$installbin/$perldll");
- copy("$perldll", "$installbin/$perldll");
- chmod(0755, "$installbin/$perldll");
+ } else {
+ $perldll = 'perl56.' . $dlext;
+ }
+
+ if ($dlsrc ne "dl_none.xs") {
+ -f $perldll || die "No perl DLL built\n";
+ }
+ # Install the DLL
+
+ safe_unlink("$installbin/$perldll");
+ copy("$perldll", "$installbin/$perldll");
+ chmod(0755, "$installbin/$perldll");
-mkpath($installprivlib, 1, 0777);
-mkpath($installarchlib, 1, 0777);
-mkpath($installsitelib, 1, 0777) if ($installsitelib);
-mkpath($installsitearch, 1, 0777) if ($installsitearch);
+mkpath($installprivlib, $verbose, 0777);
+mkpath($installarchlib, $verbose, 0777);
+mkpath($installsitelib, $verbose, 0777) if ($installsitelib);
+mkpath($installsitearch, $verbose, 0777) if ($installsitearch);
my @corefiles;
if ($Is_VMS) { # We did core file selection during build
my $coredir = "lib/$Config{archname}/$ver/CORE";
my @corefiles;
if ($Is_VMS) { # We did core file selection during build
my $coredir = "lib/$Config{archname}/$ver/CORE";
push(@corefiles,'perl.exp') if $^O eq 'aix';
if ($^O eq 'mpeix') {
# MPE needs mpeixish.h installed as well.
push(@corefiles,'perl.exp') if $^O eq 'aix';
if ($^O eq 'mpeix') {
# MPE needs mpeixish.h installed as well.
push(@corefiles,'mpeix/mpeixish.h');
}
# If they have built sperl.o...
push(@corefiles,'mpeix/mpeixish.h');
}
# If they have built sperl.o...
for (@scripts) {
(my $base = $_) =~ s#.*/##;
copy($_, "$installscript/$base");
chmod(0755, "$installscript/$base");
}
for (@scripts) {
(my $base = $_) =~ s#.*/##;
copy($_, "$installscript/$base");
chmod(0755, "$installscript/$base");
}
-unless ( $versiononly && !($installprivlib =~ m/\Q$ver/)) {
- mkpath("${installprivlib}/$pod", 1, 0777);
+if ( !$versiononly || ($installprivlib =~ m/\Q$ver/)) {
+ mkpath("${installprivlib}/$pod", $verbose, 0777);
# If Perl 5.003's perldiag.pod is there, rename it.
if (open POD, "${installprivlib}/$pod/perldiag.pod") {
# If Perl 5.003's perldiag.pod is there, rename it.
if (open POD, "${installprivlib}/$pod/perldiag.pod") {
foreach my $name (@names) {
next unless -e $name;
chmod 0777, $name if ($Is_OS2 || $Is_W32 || $Is_Cygwin);
foreach my $name (@names) {
next unless -e $name;
chmod 0777, $name if ($Is_OS2 || $Is_W32 || $Is_Cygwin);
foreach my $name (@names) {
next unless -e $name;
chmod 0777, $name if ($Is_OS2 || $Is_W32);
foreach my $name (@names) {
next unless -e $name;
chmod 0777, $name if ($Is_OS2 || $Is_W32);
safe_rename($name, "$name.old")
or warn "Couldn't rename $name: $!\n";
}
safe_rename($name, "$name.old")
or warn "Couldn't rename $name: $!\n";
}
- print " cp $from $to\n";
- print " creating new version of $to\n" if $Is_VMS and -e $to;
+ print $verbose ? " cp $from $to\n" : " $to\n" unless $silent;
+ print " creating new version of $to\n"
+ if $Is_VMS and -e $to and !$silent;
File::Copy::copy($from, $to)
? $success++
: warn "Couldn't copy $from to $to: $!\n"
File::Copy::copy($from, $to)
? $success++
: warn "Couldn't copy $from to $to: $!\n"
- print " cp $from $to\n";
- print " creating new version of $to\n" if $Is_VMS and -e $to;
+ print $verbose ? " cp $from $to\n" : " $to\n" unless $silent;
+ print " creating new version of $to\n" if $Is_VMS and -e $to and !$silent;
File::Copy::copy($from, $to)
|| warn "Couldn't copy $from to $to: $!\n"
unless $nonono;
File::Copy::copy($from, $to)
|| warn "Couldn't copy $from to $to: $!\n"
unless $nonono;
- # .exists files.
- return if $name =~ m{\.orig$|~$|^#.+#$|,v$|^\.exists};
+ # .exists files, and .PL files.
+ return if $name =~ m{\.orig$|~$|^#.+#$|,v$|^\.exists|\.PL$};
$packlist->{"$installlib/$name"} = { type => 'file' };
if (compare($_, "$installlib/$name") || $nonono) {
unlink("$installlib/$name");
$packlist->{"$installlib/$name"} = { type => 'file' };
if (compare($_, "$installlib/$name") || $nonono) {
unlink("$installlib/$name");
# HP-UX (at least) needs to maintain execute permissions
# on dynamically-loaded libraries.
copy_if_diff($_, "$installlib/$name")
# HP-UX (at least) needs to maintain execute permissions
# on dynamically-loaded libraries.
copy_if_diff($_, "$installlib/$name")