[oe-commits] Richard Purdie : perl: Enable rebuilds to account for configuration changes

git at git.openembedded.org git at git.openembedded.org
Sun Nov 9 10:21:51 UTC 2014


Module: openembedded-core.git
Branch: master
Commit: 3b8adee2756085df47b90357eed4c20ee98c7cd1
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=3b8adee2756085df47b90357eed4c20ee98c7cd1

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Wed Nov  5 18:49:03 2014 +0000

perl: Enable rebuilds to account for configuration changes

If configure/compile was rerun for perl, changes such as libdir changes
were not being picked up. To fix this we we add "make clean"
functionality, if the makefile is present.

We also in this case need to delete the .so file, else some perl modules
try and load the target arch libraries leading to build failures. I'd
love it if there were a better way to do this and am open to better
proposals but this was the best I could find, not being a perl expert.

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/recipes-devtools/perl/perl_5.20.0.bb | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/meta/recipes-devtools/perl/perl_5.20.0.bb b/meta/recipes-devtools/perl/perl_5.20.0.bb
index ec01765..ec4d214 100644
--- a/meta/recipes-devtools/perl/perl_5.20.0.bb
+++ b/meta/recipes-devtools/perl/perl_5.20.0.bb
@@ -117,6 +117,16 @@ do_configure() {
         # Make hostperl in build directory be the native perl
         ln -sf ${HOSTPERL} hostperl
 
+	if [ -n "${CONFIGURESTAMPFILE}" -a -e "${CONFIGURESTAMPFILE}" ]; then
+		if [ "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a -e Makefile ]; then
+			${MAKE} clean
+		fi
+		find ${S} -name *.so -delete
+	fi
+	if [ -n "${CONFIGURESTAMPFILE}" ]; then
+		echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE}
+	fi
+
         # Do our work in the cross subdir
         cd Cross
 



More information about the Openembedded-commits mailing list