summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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*)