blob: 5e55833ca478e93e68a648cd3de7ecbc46b11877 [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001# avoids build breaks when using no-static-libs.inc
2DISABLE_STATIC = ""
3
4def get_waf_parallel_make(d):
5 pm = d.getVar('PARALLEL_MAKE', True)
6 if pm:
7 # look for '-j' and throw other options (e.g. '-l') away
8 # because they might have different meaning in bjam
9 pm = pm.split()
10 while pm:
11 v = None
12 opt = pm.pop(0)
13 if opt == '-j':
14 v = pm.pop(0)
15 elif opt.startswith('-j'):
16 v = opt[2:].strip()
17 else:
18 v = None
19
20 if v:
21 v = min(64, int(v))
22 return '-j' + str(v)
23
24 return ""
25
Patrick Williamsc124f4f2015-09-15 14:41:29 -050026waf_do_configure() {
27 ${S}/waf configure --prefix=${prefix} ${EXTRA_OECONF}
28}
29
30waf_do_compile() {
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050031 ${S}/waf build ${@get_waf_parallel_make(d)}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050032}
33
34waf_do_install() {
35 ${S}/waf install --destdir=${D}
36}
37
38EXPORT_FUNCTIONS do_configure do_compile do_install