(Makefile.old is created by running make clean in an extension, and make clean
at the top level removes ./miniperl, so there won't be a miniperl to run
make_ext.pl. The Makefile.old logic was valid for the shell script version.
Remove $makeopts, which was missed from the make command in the transcription
from shell to Perl.
my $depth = $pname;
$depth =~ s![^/]+!..!g;
my $makefile = "Makefile";
-my $makeopts = '';
if (not -d "ext/$pname") {
print "\tSkipping $extspec (directory does not exist)\n";
$target = 'all';
}
elsif ($target =~ /clean$/) {
- # If Makefile has been moved to Makefile.old by a make clean
- # then use Makefile.old for realclean rather than rebuild it
- if (! -f $makefile and -f "Makefile.old") {
- $makefile = "Makefile.old";
- $makeopts = "-f $makefile";
- print "Note: Using Makefile.old\n";
- }
}
elsif ($target eq '') {
print "make_ext: no make target specified (eg static or dynamic)\n";