A non-zero exit is fatal according to
http://www.nntp.perl.org/group/perl.qa/2008/08/msg11236.html so do not
continue building even if a Makefile was generated (an END block or code
after WriteMakefile() could have died for example).
This patch is from trying to fix problems in this thread
http://www.nntp.perl.org/group/perl.perl5.porters/2015/10/msg231903.html
local $ENV{PERL_MM_USE_DEFAULT} = 1;
system $perl, @args;
};
- warn "$code from $ext_dir\'s Makefile.PL" if $code;
+ if($code != 0){
+ #make sure next build attempt/run of make_ext.pl doesn't succeed
+ _unlink($makefile);
+ die "Unsuccessful Makefile.PL($ext_dir): code=$code";
+ }
# Right. The reason for this little hack is that we're sitting inside
# a program run by ./miniperl, but there are tasks we need to perform