summaryrefslogtreecommitdiffstats
path: root/meta/classes/waf.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/waf.bbclass')
-rw-r--r--meta/classes/waf.bbclass24
1 files changed, 23 insertions, 1 deletions
diff --git a/meta/classes/waf.bbclass b/meta/classes/waf.bbclass
index 3a221e7082..220dc58651 100644
--- a/meta/classes/waf.bbclass
+++ b/meta/classes/waf.bbclass
@@ -1,9 +1,31 @@
1def get_waf_parallel_make(bb, d):
2 pm = d.getVar('PARALLEL_MAKE', True)
3 if pm:
4 # look for '-j' and throw other options (e.g. '-l') away
5 # because they might have different meaning in bjam
6 pm = pm.split()
7 while pm:
8 v = None
9 opt = pm.pop(0)
10 if opt == '-j':
11 v = pm.pop(0)
12 elif opt.startswith('-j'):
13 v = opt[2:].strip()
14 else:
15 v = None
16
17 if v:
18 v = min(64, int(v))
19 return '-j' + str(v)
20
21 return ""
22
1waf_do_configure() { 23waf_do_configure() {
2 ${S}/waf configure --prefix=${prefix} ${EXTRA_OECONF} 24 ${S}/waf configure --prefix=${prefix} ${EXTRA_OECONF}
3} 25}
4 26
5waf_do_compile() { 27waf_do_compile() {
6 ${S}/waf build ${PARALLEL_MAKE} 28 ${S}/waf build ${@get_waf_parallel_make('PARALLEL_MAKE', d)}
7} 29}
8 30
9waf_do_install() { 31waf_do_install() {