From bcf83bb604906361db98003127b90c422e822322 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 17 Sep 2013 11:33:49 +0000 Subject: autotools: Remove .la files if rebuilding non out of tree software Signed-off-by: Richard Purdie --- meta/classes/autotools.bbclass | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'meta/classes') diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass index 4e4ef986bf..883eb06e26 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 } -- cgit 1.2.3-korg