[oe-commits] Olof Johansson : cpan.bbclass: Fail unless Makefile.PL generates Makefile
git at git.openembedded.org
git at git.openembedded.org
Mon Jul 29 12:01:04 UTC 2013
Module: openembedded-core.git
Branch: master
Commit: 0a2dffefc6fbca37ce9604117cebc2f7d4abc1c6
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=0a2dffefc6fbca37ce9604117cebc2f7d4abc1c6
Author: Olof Johansson <olof.johansson at axis.com>
Date: Mon Jul 22 11:35:47 2013 +0200
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
Signed-off-by: Olof Johansson <olof.johansson at axis.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>
---
meta/classes/cpan.bbclass | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/meta/classes/cpan.bbclass b/meta/classes/cpan.bbclass
index bef9e82..7088039 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
cpan_do_configure () {
export PERL5LIB="${PERL_ARCHLIB}"
yes '' | perl ${EXTRA_PERLFLAGS} Makefile.PL ${EXTRA_CPANFLAGS}
+
+ # 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
+ [ -e Makefile ] || bbfatal "No Makefile was generated by Makefile.PL"
+
if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
. ${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/config.sh
# Use find since there can be a Makefile generated for each Makefile.PL
More information about the Openembedded-commits
mailing list