summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/waf.bbclass17
1 files changed, 16 insertions, 1 deletions
diff --git a/meta/classes/waf.bbclass b/meta/classes/waf.bbclass
index c4698e910a..acbda278a2 100644
--- a/meta/classes/waf.bbclass
+++ b/meta/classes/waf.bbclass
@@ -25,8 +25,23 @@ def get_waf_parallel_make(d):
25 25
26 return "" 26 return ""
27 27
28python waf_preconfigure() {
29 from distutils.version import StrictVersion
30 srcsubdir = d.getVar('S')
31 wafbin = os.path.join(srcsubdir, 'waf')
32 status, result = oe.utils.getstatusoutput(wafbin + " --version")
33 if status != 0:
34 bb.warn("Unable to execute waf --version, exit code %d. Assuming waf version without bindir/libdir support." % status)
35 return
36 version = result.split()[1]
37 if StrictVersion(version) >= StrictVersion("1.8.7"):
38 d.setVar("WAF_EXTRA_CONF", "--bindir=${bindir} --libdir=${libdir}")
39}
40
41do_configure[prefuncs] += "waf_preconfigure"
42
28waf_do_configure() { 43waf_do_configure() {
29 ${S}/waf configure --prefix=${prefix} ${EXTRA_OECONF} 44 ${S}/waf configure --prefix=${prefix} ${WAF_EXTRA_CONF} ${EXTRA_OECONF}
30} 45}
31 46
32waf_do_compile() { 47waf_do_compile() {