Return-Path: Received: from anubis.se.axis.com (anubis.se.axis.com [195.60.68.12]) by mail.openembedded.org (Postfix) with ESMTP id 7B8C961EEB for ; Mon, 22 Jul 2013 09:35:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by anubis.se.axis.com (Postfix) with ESMTP id 0883119D84 for ; Mon, 22 Jul 2013 11:35:52 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at anubis.se.axis.com Received: from anubis.se.axis.com ([127.0.0.1]) by localhost (anubis.se.axis.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id vqSY7Ffejg6P for ; Mon, 22 Jul 2013 11:35:50 +0200 (CEST) Received: from boulder.se.axis.com (boulder.se.axis.com [10.0.2.104]) by anubis.se.axis.com (Postfix) with ESMTP id 5AC5619DC3 for ; Mon, 22 Jul 2013 11:35:48 +0200 (CEST) Received: from boulder.se.axis.com (localhost [127.0.0.1]) by postfix.imss71 (Postfix) with ESMTP id 4195F4E0 for ; Mon, 22 Jul 2013 11:35:48 +0200 (CEST) Received: from thoth.se.axis.com (thoth.se.axis.com [10.0.2.173]) by boulder.se.axis.com (Postfix) with ESMTP id 36AF932F for ; Mon, 22 Jul 2013 11:35:48 +0200 (CEST) Received: from xmail2.se.axis.com (xmail2.se.axis.com [10.0.5.74]) by thoth.se.axis.com (Postfix) with ESMTP id 348173404E for ; Mon, 22 Jul 2013 11:35:48 +0200 (CEST) Received: from lnxolofjn.se.axis.com (10.92.17.1) by xmail2.se.axis.com (10.0.5.74) with Microsoft SMTP Server id 8.2.255.0; Mon, 22 Jul 2013 11:35:47 +0200 Received: by lnxolofjn.se.axis.com (Postfix, from userid 20466) id CC6999C078; Mon, 22 Jul 2013 11:35:47 +0200 (CEST) From: Olof Johansson To: Date: Mon, 22 Jul 2013 11:35:47 +0200 Message-ID: <1374485747-8334-1-git-send-email-olof.johansson@axis.com> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 Subject: [PATCH] cpan.bbclass: Fail unless Makefile.PL generates Makefile X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jul 2013 09:35:51 -0000 Content-Type: text/plain 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 --- meta/classes/cpan.bbclass | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- 1.7.10.4