summaryrefslogtreecommitdiffstats
path: root/meta/classes/waf.bbclass
AgeCommit message (Collapse)Author
2022-08-12classes: Update classes to match new bitbake class scope functionalityRichard Purdie
Move classes to classes-global or classes-recipe as appropriate to take advantage of new bitbake functionality to check class scope/usage. (From OE-Core rev: f5c128008365e141082c129417eb72d2751e8045) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12classes: Add SPDX license identifiersRichard Purdie
As stated in our top level license files, the license is MIT unless otherwise stated. Add SPDX identifers accordingly. Replace older license statementa with the standardised syntax. Also drop "All Rights Reserved" expression as it isn't used now, doesn't mean anything and is confusing. (From OE-Core rev: 081a391fe09a21265881e39a2a496e4e10b4f80b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12classes: Add copyright statements to files without oneRichard Purdie
Where there isn't a copyright statement, add one to make it explicit. Also drop editor config lines where they were present. (From OE-Core rev: 880c1ea3edc8edef974e65b2d424fc36809ea034) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-21meta/scripts: Handle bitbake variable renamingRichard Purdie
After other variables were renamed in bitbake, update OE-Core to match. (From OE-Core rev: 91812ba5a34598e03ad860745707c7cba1ae5d91) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-12waf.bbclass: drop usage of distutilsTim Orling
Refactor to use bb.utils.vercmp_string_op() instead of StrictVersion from distutils [YOCTO #14610] (From OE-Core rev: d4d57588eb7fcd25caf51450e0d19fc58e35a19d) Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-02Convert to new override syntaxRichard Purdie
This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". (From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-17waf: add ${B} to do_configure[cleandirs]Ross Burton
As waf is always out-of-tree, we can delete ${B} before every build. (From OE-Core rev: 92bf649f16926f8e3b2f7b8aab9cd7f31bbc5082) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-17waf: don't assume the waf intepretter is goodRoss Burton
Waf typically uses `python` as the intepretter but inside a task this does not exist. Typically this is solved by patching waf (see the glmark2 recipe) but not all versionf of Waf support Python 3 so we can't assume a specific interpretter. Instead, create a new variable WAF_PYTHON for the correct interpretter, and default this to `python3`. If the user has a recipe that needs Python 2 then this can be changed in the recipe. (From OE-Core rev: 802e80d35e6374b9b80f89068d00b84fe2d04ca1) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-13classes/waf: Add build and install argumentsJoshua Watt
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>
2019-04-23classes/waf: Set WAFLOCKJoshua Watt
Sets the WAFLOCK environment variable. This controls the name of the lock file that waf uses to pass the build configuration from 'configure' to 'build' and 'install'. Using a uniquely generated name based on the parameters passed to 'configure' ensures that the source directory can be configured for multiple different builds without conflicting (since the lock file is stored in ${S}) (From OE-Core rev: 29419141a42e6b6664f72d085288ba03c74f90a6) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05classes/waf: Fix builds when B != SJoshua Watt
Waf requires that the current working directory be ${S} (the location of the wscript) when building. Most of the time, this was true only because B defaults to S. However, anything that changed that behavior (notably, using externalsrc) would break the recipe. Remedy this by explicitly changing cwd to ${S} when running waf commands. As a happy side effect, B can be set up for "out of tree" builds to keep the source directory clean. (From OE-Core rev: 62dffb71ce22222c635bd90eaa47dd01f70f9c0f) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-25waf.bbclass: Throw error if waf doesn't existAmanda Brindle
Before, waf.bbclass would fail to catch FileNotFoundError. Now, it will catch this error and say that waf doesn't exist. Fixes [YOCTO 12553] (From OE-Core rev: f8321dedec7abe392f7e49ff8eee0640463adae5) Signed-off-by: Amanda Brindle <amanda.r.brindle@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-16utils.py: add parallel make helpersJoshua Watt
The code to extract the integer number of parallel build threads and construct a new argument from them has started to be copied in multiple locations, so create two new helper utilities to aid recipes. The first helper (parallel_make()) extracts the integer number of parallel build threads from PARALLEL_MAKE. The second (parallel_make_argument()) does the same and then puts the result back into a format string, optionally clamping it to some maximum value. Additionally, rework the oe-core recipes that were manually doing this to use the new helper utilities. (From OE-Core rev: ccd1142d22b31ed85d8823b1bc9e11ccfd72b61f) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-06waf.bbclass: cd to ${S} before checking versionJoshua Watt
waf requires that the current working directory be the project root (in this case ${S} when it is invoked. The check to get the waf version was being executed as a prefunc for do_configure, which meant it was executed before the current working directory was switched to ${S}, and thus would fail with some recipes. Fix this by changing to ${S} before executing "waf --version" (From OE-Core rev: aa168ee7f785ff007ca645db57698883922b5eb3) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-02waf.bbclass: Add compile progressJoshua Watt
(From OE-Core rev: c81e6386d6cf24eb6825ddd551d71a4660242fde) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-02waf.bbclass: explicitly pass bindir and libdir if supportedStefan Agner
On some build hosts distros (e.g. Fedora 26) waf tries to be smart about libdir detection and defaults to [EXEC_PREFIX/lib64]. This obviously is not what we want for 32-bit targets and usually fails in the do_package phase: WARNING: gstreamer1.0-plugins-imx-0.13.0-r0 do_package: QA Issue: gstreamer1.0-plugins-imx: Files/directories were installed but not shipped in any package: /usr/lib64/libgstimxcommon.so.0 ... Depending on version, waf knows prefix or prefix, bindir and libdir as default options. Explicitly pass the right set of arguments. (From OE-Core rev: 923f91d8d8606141ce218927bc943f4f4f34bcdd) Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-19waf.bbclass: handle PACKAGECONFIGAndreas Müller
(From OE-Core rev: 8d72bea03b3db1ddece309d1bab80f9e4c4c2d33) Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16meta: remove True option to getVar callsJoshua Lock
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-19waf.bbclass: Remove --disable-static from EXTRA_OECONFFabio Berton
As of commit OE-Core:773c9e18071d71454473dd81aff911104a2e9bc6 EXTRA_OECONF is appended with the option --disable-static on DISABLE_STATIC variable and this cause the error: waf: error: no such option: --disable-static So, we need to disable this option. (From OE-Core rev: cc100a291853c89efbf2c0c04bd9626a6546f4c7) Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-08waf.bbclass: remove unused parameter from get_waf_parallel_make()Andre McCurdy
(From OE-Core rev: f7062f54c2ad601d9838d13bfe7933be92a63214) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-11-24waf.bbclass: filter out non -j from PARALLEL_MAKEEnrico Scholz
'waf' supports only simple '-j' and fails when parallel make flags contain extended options like '--load-average'. Patch uses the method from 'boost.inc' to filter '-j'. (From OE-Core rev: bc394e1dd229845a315a97704beca43fbb8976ee) Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-06waf.bbclass: add waf build system classRoss Burton
Add a new build system class for waf. (From OE-Core rev: 2b148b9e73f05af33ed1437358fa5322cf364651) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>