diff options
author | Prymmer/Kahn <pvhp@best.com> | 2001-05-05 13:30:49 -0700 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-05-06 03:02:41 +0000 |
commit | 7e050124de5063fb9444e15d5e5ab6f28fa16a29 (patch) | |
tree | aafdd66050bd521d18528b1fd2d6eff35dc5ffd0 /win32/buildext.pl | |
parent | 3bf783c6c453d1c394391f3695a060d26d55000f (diff) | |
download | perl-7e050124de5063fb9444e15d5e5ab6f28fa16a29.tar.gz |
win32 update (VC,Borland,gcc), nmake update
Message-ID: <Pine.BSF.4.21.0105052017370.3961-100000@shell8.ba.best.com>
p4raw-id: //depot/perl@10004
Diffstat (limited to 'win32/buildext.pl')
-rw-r--r-- | win32/buildext.pl | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/win32/buildext.pl b/win32/buildext.pl index 5800750e52..59935ac459 100644 --- a/win32/buildext.pl +++ b/win32/buildext.pl @@ -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 |