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 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 4 | EXTRA_OECONF_append = " ${PACKAGECONFIG_CONFARGS}" |
| 5 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 6 | def get_waf_parallel_make(d): |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 7 | pm = d.getVar('PARALLEL_MAKE') |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 8 | if pm: |
| 9 | # look for '-j' and throw other options (e.g. '-l') away |
| 10 | # because they might have different meaning in bjam |
| 11 | pm = pm.split() |
| 12 | while pm: |
| 13 | v = None |
| 14 | opt = pm.pop(0) |
| 15 | if opt == '-j': |
| 16 | v = pm.pop(0) |
| 17 | elif opt.startswith('-j'): |
| 18 | v = opt[2:].strip() |
| 19 | else: |
| 20 | v = None |
| 21 | |
| 22 | if v: |
| 23 | v = min(64, int(v)) |
| 24 | return '-j' + str(v) |
| 25 | |
| 26 | return "" |
| 27 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 28 | waf_do_configure() { |
| 29 | ${S}/waf configure --prefix=${prefix} ${EXTRA_OECONF} |
| 30 | } |
| 31 | |
| 32 | waf_do_compile() { |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 33 | ${S}/waf build ${@get_waf_parallel_make(d)} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 34 | } |
| 35 | |
| 36 | waf_do_install() { |
| 37 | ${S}/waf install --destdir=${D} |
| 38 | } |
| 39 | |
| 40 | EXPORT_FUNCTIONS do_configure do_compile do_install |