Re-establish the fp overflow detection for VAX VMS; there
[p5sagit/p5-mst-13.2.git] / win32 / buildext.pl
index 5800750..59935ac 100644 (file)
@@ -1,3 +1,23 @@
+=head1 NAME
+
+buildext.pl - build extensions
+
+=head1 SYNOPSIS
+
+    buildext.pl make [-make_opts] dep directory [target]
+
+E.g.
+
+    buildext.pl nmake -nologo perldll.def ..\ext
+
+    buildext.pl nmake -nologo perldll.def ..\ext clean
+
+    buildext.pl dmake perldll.def ..\ext
+
+    buildext.pl dmake perldll.def ..\ext clean
+
+=cut
+
 use File::Basename;
 use Cwd;
 use FindExt;
@@ -14,6 +34,7 @@ my $dep  = shift;
 my $dmod = -M $dep;
 my $dir  = shift;
 chdir($dir) || die "Cannot cd to $dir\n";
+my $targ  = shift;
 (my $ext = getcwd()) =~ s,/,\\,g;
 FindExt::scan_ext($ext);
 
@@ -27,7 +48,8 @@ foreach my $dir (sort @ext)
     if (!(-f 'Makefile') || $mmod > $dmod)
      {
       print "\nRunning Makefile.PL in $dir\n";
-      my $code = system($perl,"-I$here\\..\lib",'Makefile.PL','INSTALLDIRS=perl');
+      print "$perl \"-I$here\\..\\lib\" Makefile.PL INSTALLDIRS=perl\n";
+      my $code = system($perl,"-I$here\\..\\lib",'Makefile.PL','INSTALLDIRS=perl');
       warn "$code from $dir's Makefile.PL" if $code;
       $mmod = -M 'Makefile';
       if ($mmod > $dmod)
@@ -35,8 +57,16 @@ foreach my $dir (sort @ext)
         warn "Makefile $mmod > $dmod ($dep)\n";
        }
      }  
-    print "\nMaking $dir\n";
-    system($make);
+    if ($targ)
+     {
+      print "Making $targ in $dir\n$make $targ\n";
+      system($make,$targ);
+     }
+    else
+     {
+      print "Making $dir\n$make\n";
+      system($make);
+     }
     chdir($here) || die "Cannot cd to $here:$!";
    }
   else