summaryrefslogtreecommitdiffstats
path: root/meta/classes/autotools.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-11 15:22:29 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-28 16:53:12 +0100
commit241653a01ba98426cc0551ff4210e1f8eb28abdb (patch)
treeb00aa7aab97fe2ed369856c7069126cd330f6c5d /meta/classes/autotools.bbclass
parentf6fb4890dff0b4970942e8be04722459ac8c4649 (diff)
downloadpoky-241653a01ba98426cc0551ff4210e1f8eb28abdb.tar.gz
autotools.bbclass: Add functionality to force a clean of ${B} when reconfiguring (and ${S} != ${B})
Unfortunately whilst rerunning configure and make against a project will mostly work there are situations where it does not correctly do the right thing. In particular, eglibc and gcc will fail out with errors where settings do not match a previously built configuration. It could be argued they are broken but the situation is what it is. There is the possibility of more subtle errors too. This patch adds removal of the build directory (${B}) when configure is rerunning, the sstate checksum for do_configure has changed and ${S} != ${B}. We could simply use a stamp but saving out the previous configuration checksum adds some data at no real overhead. If we find there are things where we want to disable this behaviour with CONFIGURESTAMPFILE = "" in the recipe, or users could disable it globally. [YOCTO #2774] [YOCTO #2848] This is particularly helpful for eglibc and gcc which use split builds by default and are a particular source of reconfigure type problems. (From OE-Core rev: f15f61af77cc4e52a037f509f8e49e1ea530cf35) (From OE-Core rev: 14fc04e480aaf1cb5cd9d3a04a5b38d2fda115b1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/autotools.bbclass')
-rw-r--r--meta/classes/autotools.bbclass21
1 files changed, 21 insertions, 0 deletions
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 941c06d032..141b2eea94 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -82,6 +82,27 @@ oe_runconf () {
82 82
83AUTOTOOLS_AUXDIR ?= "${S}" 83AUTOTOOLS_AUXDIR ?= "${S}"
84 84
85CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate"
86
87autotools_preconfigure() {
88 if [ -n "${CONFIGURESTAMPFILE}" -a -e "${CONFIGURESTAMPFILE}" ]; then
89 if [ "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${S}" != "${B}" ]; then
90 echo "Previously configured separate build directory detected, cleaning ${B}"
91 rm -rf ${B}
92 mkdir ${B}
93 fi
94 fi
95}
96
97autotools_postconfigure(){
98 if [ -n "${CONFIGURESTAMPFILE}" ]; then
99 echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE}
100 fi
101}
102
103do_configure[prefuncs] += "autotools_preconfigure"
104do_configure[postfuncs] += "autotools_postconfigure"
105
85autotools_do_configure() { 106autotools_do_configure() {
86 case ${PN} in 107 case ${PN} in
87 autoconf*) 108 autoconf*)