diff options
Diffstat (limited to 'meta/classes/waf.bbclass')
-rw-r--r-- | meta/classes/waf.bbclass | 24 |
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 @@ | |||
1 | def 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 | |||
1 | waf_do_configure() { | 23 | waf_do_configure() { |
2 | ${S}/waf configure --prefix=${prefix} ${EXTRA_OECONF} | 24 | ${S}/waf configure --prefix=${prefix} ${EXTRA_OECONF} |
3 | } | 25 | } |
4 | 26 | ||
5 | waf_do_compile() { | 27 | waf_do_compile() { |
6 | ${S}/waf build ${PARALLEL_MAKE} | 28 | ${S}/waf build ${@get_waf_parallel_make('PARALLEL_MAKE', d)} |
7 | } | 29 | } |
8 | 30 | ||
9 | waf_do_install() { | 31 | waf_do_install() { |