[oe-commits] Richard Purdie : autotools: Remove . la files if rebuilding non out of tree software

git at git.openembedded.org git at git.openembedded.org
Tue Sep 17 13:23:50 UTC 2013


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

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Tue Sep 17 11:33:49 2013 +0000

autotools: Remove .la files if rebuilding non out of tree software

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

---

 meta/classes/autotools.bbclass |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 4e4ef98..883eb06 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -108,10 +108,16 @@ CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate"
 
 autotools_preconfigure() {
 	if [ -n "${CONFIGURESTAMPFILE}" -a -e "${CONFIGURESTAMPFILE}" ]; then
-		if [ "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${S}" != "${B}" ]; then
-			echo "Previously configured separate build directory detected, cleaning ${B}"
-			rm -rf ${B}
-			mkdir ${B}
+		if [ "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" ]; then
+			if [ "${S}" != "${B}" ]; then
+				echo "Previously configured separate build directory detected, cleaning ${B}"
+				rm -rf ${B}
+				mkdir ${B}
+			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
+			fi
 		fi
 	fi
 }



More information about the Openembedded-commits mailing list