diff options
| -rw-r--r-- | meta/classes/autotools.bbclass | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass index 4c4bf8775d..a5997c55e0 100644 --- a/meta/classes/autotools.bbclass +++ b/meta/classes/autotools.bbclass | |||
| @@ -89,6 +89,27 @@ oe_runconf () { | |||
| 89 | 89 | ||
| 90 | AUTOTOOLS_AUXDIR ?= "${S}" | 90 | AUTOTOOLS_AUXDIR ?= "${S}" |
| 91 | 91 | ||
| 92 | CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate" | ||
| 93 | |||
| 94 | autotools_preconfigure() { | ||
| 95 | if [ -n "${CONFIGURESTAMPFILE}" -a -e "${CONFIGURESTAMPFILE}" ]; then | ||
| 96 | if [ "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${S}" != "${B}" ]; then | ||
| 97 | echo "Previously configured separate build directory detected, cleaning ${B}" | ||
| 98 | rm -rf ${B} | ||
| 99 | mkdir ${B} | ||
| 100 | fi | ||
| 101 | fi | ||
| 102 | } | ||
| 103 | |||
| 104 | autotools_postconfigure(){ | ||
| 105 | if [ -n "${CONFIGURESTAMPFILE}" ]; then | ||
| 106 | echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE} | ||
| 107 | fi | ||
| 108 | } | ||
| 109 | |||
| 110 | do_configure[prefuncs] += "autotools_preconfigure" | ||
| 111 | do_configure[postfuncs] += "autotools_postconfigure" | ||
| 112 | |||
| 92 | autotools_do_configure() { | 113 | autotools_do_configure() { |
| 93 | case ${PN} in | 114 | case ${PN} in |
| 94 | autoconf*) | 115 | autoconf*) |
