]> code.ossystems Code Review - openembedded-core.git/commitdiff
cpan.bbclass: Fail unless Makefile.PL generates Makefile
authorOlof Johansson <olof.johansson@axis.com>
Mon, 22 Jul 2013 09:35:47 +0000 (11:35 +0200)
committerSaul Wold <sgw@linux.intel.com>
Fri, 26 Jul 2013 06:44:27 +0000 (23:44 -0700)
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@axis.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/classes/cpan.bbclass

index bef9e82685badc2326eb2fdbd3ab7694e2652c99..7088039fa01b0501a28158408c85cb9cbca41cbf 100644 (file)
@@ -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