summaryrefslogtreecommitdiff
path: root/make_ext.pl
diff options
context:
space:
mode:
authorDaniel Dragan <bulk88@hotmail.com>2015-10-20 18:03:45 -0400
committerTony Cook <tony@develop-help.com>2015-10-21 10:23:38 +1100
commitb5f7915ceb5ed4ec947f64365f20ecd4cfd9ace5 (patch)
tree2af0b9d2accfd1aca78a9519bc2033a5c2aab278 /make_ext.pl
parent7792a6f57ff2d26f28d2ef67be13cf7f9fd31ef3 (diff)
downloadperl-b5f7915ceb5ed4ec947f64365f20ecd4cfd9ace5.tar.gz
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
Diffstat (limited to 'make_ext.pl')
-rw-r--r--make_ext.pl6
1 files changed, 5 insertions, 1 deletions
diff --git a/make_ext.pl b/make_ext.pl
index f6d9e0f120..223f67e6bf 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