BEGIN {
require 5.004;
+ chdir '..' if !-d 'lib' and -d '..\lib';
@INC = 'lib';
$ENV{PERL5LIB} = 'lib';
}
@pods = (<pod/*.pod>);
%archpms = (Config => 1, FileHandle => 1, overload => 1);
+
+if ($^O eq 'dos') {
+ push(@scripts,'djgpp/fixpmain');
+ $archpms{config} = $archpms{filehand} = 1;
+}
+
find(sub {
if ("$File::Find::dir/$_" =~ m{^ext/[^/]+/(.*)\.pm$}) {
(my $pm = $1) =~ s{^lib/}{};
-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' || warn "WARNING: You've never run 'make test'!!!",
- " (Installing anyway.)\n";
+-x 't/TEST' || $^O eq 'MSWin32'
+ || warn "WARNING: You've never run 'make test'!!!",
+ " (Installing anyway.)\n";
if ($^O eq 'MSWin32') {
# First we install the version-numbered executables.
-safe_unlink("$installbin/perl$ver$exe_ext");
-copy("perl$exe_ext", "$installbin/perl$ver$exe_ext");
-chmod(0755, "$installbin/perl$ver$exe_ext");
+if ($^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 {
+ safe_unlink("$installbin/perl.exe");
+ copy("perl.exe", "$installbin/perl.exe");
+}
safe_unlink("$installbin/sperl$ver$exe_ext");
if ($d_dosuid) {
"$installarchlib/CORE/$file");
}
+# Install main perl executables
+# Make links to ordinary names if installbin directory isn't current directory.
+
+if (! $versiononly && ! samepath($installbin, '.') && ($^O ne 'dos')) {
+ 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")
+ if $d_dosuid;
+}
+
# Offer to install perl in a "standard" location
$mainperl_is_instperl = 0;
-if (!$versiononly && !$nonono && -t STDIN && -t STDERR
+if (!$versiononly && !$nonono && $^O ne 'MSWin32' && -t STDIN && -t STDERR
&& -w $mainperldir && ! samepath($mainperldir, $installbin)) {
local($usrbinperl) = "$mainperldir/perl$exe_ext";
local($instperl) = "$installbin/perl$exe_ext";
# Make links to ordinary names if installbin directory isn't current directory.
-if (! $versiononly && ! samepath($installbin, '.')) {
- 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")
- if $d_dosuid;
-}
-
if (!$versiononly && ! samepath($installbin, 'x2p')) {
safe_unlink("$installbin/a2p$exe_ext");
copy("x2p/a2p$exe_ext", "$installbin/a2p$exe_ext");
if (! $versiononly) {
safe_unlink("$installscript/pstruct");
- link("$installscript/c2ph","$installscript/pstruct");
+ if ($^O eq 'dos') {
+ copy("$installscript/c2ph","$installscript/pstruct");
+ } else {
+ link("$installscript/c2ph","$installscript/pstruct");
+ }
}
# Install pod pages. Where? I guess in $installprivlib/pod.
if (compare($from, $to) || $nonono) {
mkpath("${installarchlib}/pod", 1, 0777);
unlink($to);
- link($from, $to);
+ link($from, $to) if ($^O ne 'dos');
}
}
sub chmod {
local($mode,$name) = @_;
+ return if ($^O eq 'dos');
printf STDERR " chmod %o %s\n", $mode, $name;
CORE::chmod($mode,$name)
|| warn sprintf("Couldn't chmod %o %s: $!\n", $mode, $name)