[oe-commits] Richard Purdie : autotools: Use make clean for builds not supporting B != S

git at git.openembedded.org git at git.openembedded.org
Thu Oct 30 13:12:04 UTC 2014


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

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Fri Oct 24 15:15:50 2014 +0100

autotools: Use make clean for builds not supporting B != S

If the build doesn't support B != S, we can try running "make clean" instead
to try and clean up previous objects if the hash for the task has changed.

This tries to ensure that when variables like ${baselib} change, the changes are
correctly accounted for.

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

---

 meta/classes/autotools.bbclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 6b99bdd..bed8a83 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -109,7 +109,11 @@ autotools_preconfigure() {
 			else
 				# At least remove the .la files since automake won't automatically
 				# regenerate them even if CFLAGS/LDFLAGS are different
-				cd ${S}; find ${S} -name \*.la -delete
+				cd ${S}
+				if [ -e Makefile -o -e makefile -o -e GNUmakefile ]; then
+					${MAKE} clean
+				fi
+				find ${S} -name \*.la -delete
 			fi
 		fi
 	fi



More information about the Openembedded-commits mailing list