[asperl] fixups to make it build and pass tests under both compilers
[p5sagit/p5-mst-13.2.git] / installperl
index b422018..3ec0f50 100755 (executable)
@@ -38,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/}{};
@@ -111,13 +119,16 @@ if ($d_dosuid && $>) { die "You must run as root to install suidperl\n"; }
 
 if ($^O eq 'MSWin32') {
 
--f 'perl.' . $dlext || die "No perl DLL built\n";
+$perldll = 'perl.' . $dlext;
+$perldll = 'perlcore.' . $dlext if $Config{'ccflags'} =~ /PERL_OBJECT/i;
+
+-f $perldll || die "No perl DLL built\n";
 
 # Install the DLL
 
-safe_unlink("$installbin/$perl.$dlext");
-copy("perl.$dlext", "$installbin/$perl.$dlext");
-chmod(0755, "$installbin/$perl.$dlext");
+safe_unlink("$installbin/$perldll");
+copy("$perldll", "$installbin/$perldll");
+chmod(0755, "$installbin/$perldll");
 }
 
 # This will be used to store the packlist