summaryrefslogtreecommitdiffstats
path: root/meta/classes/waf.bbclass
diff options
context:
space:
mode:
authorJoshua Watt <JPEWhacker@gmail.com>2021-01-16 09:44:13 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-01-21 23:08:16 +0000
commit04481e76c7f6aef04d0f819b1455f60cb4fdf3ae (patch)
treeed4f48455eaa5fa2fdd9e0e65e6409e094475c59 /meta/classes/waf.bbclass
parentbe9459683442425be03583924c70113a430f1e31 (diff)
downloadpoky-04481e76c7f6aef04d0f819b1455f60cb4fdf3ae.tar.gz
classes/waf: Add build and install arguments
Adds variables that can be used to allow a recipe to pass extra arguments to `waf build` and `waf install`. In most cases, you want to pass the same arguments to `build` and `install` (since install is a superset of `build`), so by default setting EXTRA_OEWAF_BUILD also affects `waf install`, but this can be overridded. (From OE-Core rev: 493e17a2f5cbbbe3b1e435dadb281b007bca2cbf) (From OE-Core rev: 84a2778a6c03c942fd61f630d0c82d6ea29717e1) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 633652284b13dc78206f4cc8e81f29de44777b75) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/waf.bbclass')
-rw-r--r--meta/classes/waf.bbclass9
1 files changed, 7 insertions, 2 deletions
diff --git a/meta/classes/waf.bbclass b/meta/classes/waf.bbclass
index 900244004e..309f625a40 100644
--- a/meta/classes/waf.bbclass
+++ b/meta/classes/waf.bbclass
@@ -5,6 +5,11 @@ B = "${WORKDIR}/build"
5 5
6EXTRA_OECONF_append = " ${PACKAGECONFIG_CONFARGS}" 6EXTRA_OECONF_append = " ${PACKAGECONFIG_CONFARGS}"
7 7
8EXTRA_OEWAF_BUILD ??= ""
9# In most cases, you want to pass the same arguments to `waf build` and `waf
10# install`, but you can override it if necessary
11EXTRA_OEWAF_INSTALL ??= "${EXTRA_OEWAF_BUILD}"
12
8def waflock_hash(d): 13def waflock_hash(d):
9 # Calculates the hash used for the waf lock file. This should include 14 # Calculates the hash used for the waf lock file. This should include
10 # all of the user controllable inputs passed to waf configure. Note 15 # all of the user controllable inputs passed to waf configure. Note
@@ -55,11 +60,11 @@ waf_do_configure() {
55 60
56do_compile[progress] = "outof:^\[\s*(\d+)/\s*(\d+)\]\s+" 61do_compile[progress] = "outof:^\[\s*(\d+)/\s*(\d+)\]\s+"
57waf_do_compile() { 62waf_do_compile() {
58 (cd ${S} && ./waf build ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)}) 63 (cd ${S} && ./waf build ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)} ${EXTRA_OEWAF_BUILD})
59} 64}
60 65
61waf_do_install() { 66waf_do_install() {
62 (cd ${S} && ./waf install --destdir=${D}) 67 (cd ${S} && ./waf install --destdir=${D} ${EXTRA_OEWAF_INSTALL})
63} 68}
64 69
65EXPORT_FUNCTIONS do_configure do_compile do_install 70EXPORT_FUNCTIONS do_configure do_compile do_install