summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorVadim Konovalov <vkonovalov@lucent.com>2002-05-16 07:33:23 +0400
committerJarkko Hietaniemi <jhi@iki.fi>2002-05-16 13:22:57 +0000
commitfefd7080dbb7bc74916ad5ba8b63e3bdeeb86c38 (patch)
tree069dc5c7b8ba63e6a4733979f5e9fd2a24fb1ce5 /win32
parentdbfdd4380d0545596477e869e5553d1636fc53ce (diff)
downloadperl-fefd7080dbb7bc74916ad5ba8b63e3bdeeb86c38.tar.gz
good day for WinCE port of perl.
Message-ID: <001301c1fc68$e808e560$a95cc3d9@vad> p4raw-id: //depot/perl@16628
Diffstat (limited to 'win32')
-rw-r--r--win32/buildext.pl28
1 files changed, 23 insertions, 5 deletions
diff --git a/win32/buildext.pl b/win32/buildext.pl
index 7125753709..65b79beb94 100644
--- a/win32/buildext.pl
+++ b/win32/buildext.pl
@@ -4,7 +4,7 @@ buildext.pl - build extensions
=head1 SYNOPSIS
- buildext.pl make [-make_opts] dep directory [target]
+ buildext.pl make [-make_opts] dep directory [target] !ext1 !ext2
E.g.
@@ -16,11 +16,19 @@ E.g.
buildext.pl dmake perldll.def ..\ext clean
+Will skip building extensions which are marked with an '!' char.
+Mostly because they still not ported to specified platform.
+
=cut
use File::Basename;
use Cwd;
use FindExt;
+
+# @ARGV with '!' at first position are exclusions
+my %excl = map {$_=>1} map {/^!(.*)$/} @ARGV;
+@ARGV = grep {!/^!/} @ARGV;
+
my $here = getcwd();
my $perl = $^X;
$here =~ s,/,\\,g;
@@ -36,7 +44,7 @@ my $pl2bat = "$topdir\\win32\\bin\\pl2bat";
unless (-f "$pl2bat.bat") {
my @args = ($perl, ("$pl2bat.pl") x 2);
print "@args\n";
- system(@args);
+ system(@args) unless defined $::Cross::platform;
}
my $make = shift;
$make .= " ".shift while $ARGV[0]=~/^-/;
@@ -46,12 +54,17 @@ my $dir = shift;
chdir($dir) || die "Cannot cd to $dir\n";
my $targ = shift;
(my $ext = getcwd()) =~ s,/,\\,g;
+my $code;
FindExt::scan_ext($ext);
my @ext = FindExt::extensions();
foreach my $dir (sort @ext)
{
+ if (exists $excl{$dir}) {
+ warn "Skipping extension $ext\\$dir, not ported to current platform";
+ next;
+ }
if (chdir("$ext\\$dir"))
{
my $mmod = -M 'Makefile';
@@ -60,8 +73,11 @@ foreach my $dir (sort @ext)
print "\nRunning Makefile.PL in $dir\n";
my @perl = ($perl, "-I$here\\..\\lib", 'Makefile.PL',
'INSTALLDIRS=perl', 'PERL_CORE=1');
+ if (defined $::Cross::platform) {
+ @perl = (@perl[0,1],"-MCross=$::Cross::platform",@perl[2..$#perl]);
+ }
print join(' ', @perl), "\n";
- my $code = system(@perl);
+ $code = system(@perl);
warn "$code from $dir's Makefile.PL" if $code;
$mmod = -M 'Makefile';
if ($mmod > $dmod)
@@ -72,12 +88,14 @@ foreach my $dir (sort @ext)
if ($targ)
{
print "Making $targ in $dir\n$make $targ\n";
- system("$make $targ");
+ $code = system("$make $targ");
+ die "Unsuccessful make($dir): code=$code" if $code!=0;
}
else
{
print "Making $dir\n$make\n";
- system($make);
+ $code = system($make);
+ die "Unsuccessful make($dir): code=$code" if $code!=0;
}
chdir($here) || die "Cannot cd to $here:$!";
}