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 print "$perl \"-I$here\\..\\lib\" Makefile.PL INSTALLDIRS=perl\n";
52 my $code = system($perl,"-I$here\\..\\lib",'Makefile.PL','INSTALLDIRS=perl');
53 warn "$code from $dir's Makefile.PL" if $code;
54 $mmod = -M 'Makefile';
57 warn "Makefile $mmod > $dmod ($dep)\n";
62 print "Making $targ in $dir\n$make $targ\n";
63 system("$make $targ");
67 print "Making $dir\n$make\n";
70 chdir($here) || die "Cannot cd to $here:$!";
74 warn "Cannot cd to $ext\\$dir:$!";