summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Watt <JPEWhacker@gmail.com>2021-01-16 09:44:13 -0800
committerSteve Sakoman <steve@sakoman.com>2021-01-19 04:22:10 -1000
commit84a2778a6c03c942fd61f630d0c82d6ea29717e1 (patch)
tree244f5c2841b9df38ec75423e80073dd066f31cdb
parent5d3354a1f03f17668c393049928375335059d4e5 (diff)
downloadopenembedded-core-84a2778a6c03c942fd61f630d0c82d6ea29717e1.tar.gz
openembedded-core-84a2778a6c03c942fd61f630d0c82d6ea29717e1.tar.bz2
openembedded-core-84a2778a6c03c942fd61f630d0c82d6ea29717e1.zip
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) 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>
-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"
EXTRA_OECONF_append = " ${PACKAGECONFIG_CONFARGS}"
+EXTRA_OEWAF_BUILD ??= ""
+# In most cases, you want to pass the same arguments to `waf build` and `waf
+# install`, but you can override it if necessary
+EXTRA_OEWAF_INSTALL ??= "${EXTRA_OEWAF_BUILD}"
+
def waflock_hash(d):
# Calculates the hash used for the waf lock file. This should include
# all of the user controllable inputs passed to waf configure. Note
@@ -55,11 +60,11 @@ waf_do_configure() {
do_compile[progress] = "outof:^\[\s*(\d+)/\s*(\d+)\]\s+"
waf_do_compile() {
- (cd ${S} && ./waf build ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)})
+ (cd ${S} && ./waf build ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)} ${EXTRA_OEWAF_BUILD})
}
waf_do_install() {
- (cd ${S} && ./waf install --destdir=${D})
+ (cd ${S} && ./waf install --destdir=${D} ${EXTRA_OEWAF_INSTALL})
}
EXPORT_FUNCTIONS do_configure do_compile do_install