3 buildext.pl - build extensions
7 buildext.pl make [-make_opts] dep directory [target]
11 buildext.pl nmake -nologo perldll.def ..\ext
13 buildext.pl nmake -nologo perldll.def ..\ext clean
15 buildext.pl dmake perldll.def ..\ext
17 buildext.pl dmake perldll.def ..\ext clean
27 if ($perl =~ m#^\.\.#)
29 $perl = "$here\\$perl";
32 $make .= " ".shift while $ARGV[0]=~/^-/;
36 chdir($dir) || die "Cannot cd to $dir\n";
38 (my $ext = getcwd()) =~ s,/,\\,g;
39 FindExt::scan_ext($ext);
41 my @ext = FindExt::extensions();
43 foreach my $dir (sort @ext)
45 if (chdir("$ext\\$dir"))
47 my $mmod = -M 'Makefile';
48 if (!(-f 'Makefile') || $mmod > $dmod)
50 print "\nRunning Makefile.PL in $dir\n";
51 my @perl = ($perl, "-I$here\\..\\lib", 'Makefile.PL',
52 'INSTALLDIRS=perl', 'PERL_CORE=1');
53 print join(' ', @perl), "\n";
54 my $code = system(@perl);
55 warn "$code from $dir's Makefile.PL" if $code;
56 $mmod = -M 'Makefile';
59 warn "Makefile $mmod > $dmod ($dep)\n";
64 print "Making $targ in $dir\n$make $targ\n";
65 system("$make $targ");
69 print "Making $dir\n$make\n";
72 chdir($here) || die "Cannot cd to $here:$!";
76 warn "Cannot cd to $ext\\$dir:$!";