summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorOlof Johansson <olof.johansson@axis.com>2013-07-22 11:35:47 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-07-29 13:08:59 +0100
commitb71aa9758affee6b2f901b6cdeb3b0f2b72eec15 (patch)
tree39ea6af6abfc0801ca2d8f5f88ae2f34d8749866 /meta
parent6bb09dad028bb01ec7dbe8cb4511c4357fa1b52d (diff)
downloadpoky-b71aa9758affee6b2f901b6cdeb3b0f2b72eec15.tar.gz
cpan.bbclass: Fail unless Makefile.PL generates Makefile
Makefile.PLs can exit with success without generating a Makefile, e.g. in cases of missing configure time dependencies. This is considered a best practice by cpantesters.org. See: * http://wiki.cpantesters.org/wiki/CPANAuthorNotes * http://www.nntp.perl.org/group/perl.qa/2008/08/msg11236.html (From OE-Core rev: 0a2dffefc6fbca37ce9604117cebc2f7d4abc1c6) Signed-off-by: Olof Johansson <olof.johansson@axis.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/cpan.bbclass9
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/classes/cpan.bbclass b/meta/classes/cpan.bbclass
index bef9e82685..7088039fa0 100644
--- a/meta/classes/cpan.bbclass
+++ b/meta/classes/cpan.bbclass
@@ -18,6 +18,15 @@ export PERLHOSTLIB = "${STAGING_LIBDIR_NATIVE}/perl-native/perl/${@get_perl_vers
18cpan_do_configure () { 18cpan_do_configure () {
19 export PERL5LIB="${PERL_ARCHLIB}" 19 export PERL5LIB="${PERL_ARCHLIB}"
20 yes '' | perl ${EXTRA_PERLFLAGS} Makefile.PL ${EXTRA_CPANFLAGS} 20 yes '' | perl ${EXTRA_PERLFLAGS} Makefile.PL ${EXTRA_CPANFLAGS}
21
22 # Makefile.PLs can exit with success without generating a
23 # Makefile, e.g. in cases of missing configure time
24 # dependencies. This is considered a best practice by
25 # cpantesters.org. See:
26 # * http://wiki.cpantesters.org/wiki/CPANAuthorNotes
27 # * http://www.nntp.perl.org/group/perl.qa/2008/08/msg11236.html
28 [ -e Makefile ] || bbfatal "No Makefile was generated by Makefile.PL"
29
21 if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then 30 if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
22 . ${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/config.sh 31 . ${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/config.sh
23 # Use find since there can be a Makefile generated for each Makefile.PL 32 # Use find since there can be a Makefile generated for each Makefile.PL