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

(From OE-Core rev: bcf83bb604906361db98003127b90c422e822322)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2013-09-17 11:33:49 +00:00
parent 912e8d5672
commit 641a80d760
1 changed files with 10 additions and 4 deletions

View File

@ -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
}