From b5f7915ceb5ed4ec947f64365f20ecd4cfd9ace5 Mon Sep 17 00:00:00 2001 From: Daniel Dragan Date: Tue, 20 Oct 2015 18:03:45 -0400 Subject: [PATCH] make non-zero exit from Makefile.PL fatal in make_ext.pl 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 --- make_ext.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/make_ext.pl b/make_ext.pl index f6d9e0f..223f67e 100644 --- a/make_ext.pl +++ b/make_ext.pl @@ -520,7 +520,11 @@ EOM 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 -- 1.8.3.1