Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | # avoids build breaks when using no-static-libs.inc |
| 2 | DISABLE_STATIC = "" |
| 3 | |
| 4 | def 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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 26 | waf_do_configure() { |
| 27 | ${S}/waf configure --prefix=${prefix} ${EXTRA_OECONF} |
| 28 | } |
| 29 | |
| 30 | waf_do_compile() { |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 31 | ${S}/waf build ${@get_waf_parallel_make(d)} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | waf_do_install() { |
| 35 | ${S}/waf install --destdir=${D} |
| 36 | } |
| 37 | |
| 38 | EXPORT_FUNCTIONS do_configure do_compile do_install |