All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cpan.bbclass: Fail unless Makefile.PL generates Makefile
@ 2013-07-22  9:35 Olof Johansson
  0 siblings, 0 replies; only message in thread
From: Olof Johansson @ 2013-07-22  9:35 UTC (permalink / raw)
  To: openembedded-core

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>
---
 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



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-07-22  9:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-22  9:35 [PATCH] cpan.bbclass: Fail unless Makefile.PL generates Makefile Olof Johansson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.