aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-10-24 15:17:03 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-10-30 13:03:55 +0000
commitd06f2c089e01b7c67699800a7a54a4225233da93 (patch)
treecab6158cede43c372260b45895cd52f00af024e0
parentc2f761e2010857e2a2aad1dccf06ec39d15c1c86 (diff)
downloadopenembedded-core-contrib-d06f2c089e01b7c67699800a7a54a4225233da93.tar.gz
openembedded-core-contrib-d06f2c089e01b7c67699800a7a54a4225233da93.tar.bz2
openembedded-core-contrib-d06f2c089e01b7c67699800a7a54a4225233da93.zip
base.bbclass: Enable using 'make clean' for rebuilds
When something rebuilds say due to ${baselib} changing or some other key variable, software is often not rebuilt due to the fact that make detects no dependency change. By running "make clean" when these changes occur, we can at least try and ensure the correct rebuilds happen. We use the same checksum check as autotools to decide if things have changed or not. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/base.bbclass15
1 files changed, 14 insertions, 1 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index ff8c63394f..e1b25ff134 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -216,11 +216,24 @@ python base_eventhandler() {
}
+CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate"
+
addtask configure after do_patch
do_configure[dirs] = "${S} ${B}"
do_configure[deptask] = "do_populate_sysroot"
base_do_configure() {
- :
+ if [ -n "${CONFIGURESTAMPFILE}" -a -e "${CONFIGURESTAMPFILE}" ]; then
+ if [ "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" ]; then
+ cd ${B}
+ if [ -e Makefile -o -e makefile -o -e GNUmakefile ]; then
+ ${MAKE} clean
+ fi
+ find ${B} -name \*.la -delete
+ fi
+ fi
+ if [ -n "${CONFIGURESTAMPFILE}" ]; then
+ echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE}
+ fi
}
addtask compile after do_configure