summaryrefslogtreecommitdiffstats
path: root/meta/classes/base.bbclass
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:11:51 +0000
commit6bd2d9d395fe7c97a0a9645ca9379b366bb64afa (patch)
tree8a5daa4451cfab927f13e95f8d5f021fe80e3c4d /meta/classes/base.bbclass
parent444ae98131f7f9e962d102f408eb867ab53a452a (diff)
downloadpoky-6bd2d9d395fe7c97a0a9645ca9379b366bb64afa.tar.gz
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. (From OE-Core rev: d06f2c089e01b7c67699800a7a54a4225233da93) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/base.bbclass')
-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() {
216 216
217} 217}
218 218
219CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate"
220
219addtask configure after do_patch 221addtask configure after do_patch
220do_configure[dirs] = "${S} ${B}" 222do_configure[dirs] = "${S} ${B}"
221do_configure[deptask] = "do_populate_sysroot" 223do_configure[deptask] = "do_populate_sysroot"
222base_do_configure() { 224base_do_configure() {
223 : 225 if [ -n "${CONFIGURESTAMPFILE}" -a -e "${CONFIGURESTAMPFILE}" ]; then
226 if [ "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" ]; then
227 cd ${B}
228 if [ -e Makefile -o -e makefile -o -e GNUmakefile ]; then
229 ${MAKE} clean
230 fi
231 find ${B} -name \*.la -delete
232 fi
233 fi
234 if [ -n "${CONFIGURESTAMPFILE}" ]; then
235 echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE}
236 fi
224} 237}
225 238
226addtask compile after do_configure 239addtask compile after do_configure