]> code.ossystems Code Review - openembedded-core.git/commitdiff
perl: Enable rebuilds to account for configuration changes
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 5 Nov 2014 18:49:03 +0000 (18:49 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 8 Nov 2014 11:07:58 +0000 (11:07 +0000)
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@linuxfoundation.org>
meta/recipes-devtools/perl/perl_5.20.0.bb

index ec01765ea3d644ca02d3541e8798c36f8e11395b..ec4d2140e7fd2278342d3858ee5b209182a24fc8 100644 (file)
@@ -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