]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
meson.bbclass: add MESON_TARGET
authorRoss Burton <ross.burton@arm.com>
Thu, 10 Aug 2023 16:24:43 +0000 (17:24 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 16 Aug 2023 06:53:23 +0000 (07:53 +0100)
Add a variable to control what target gets built in do_compile.  By
default this value is unset so meson builds the default target, but by
setting MESON_TARGET a specific target can be built.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/meson.bbclass

index 7f5e9b1943394d63ca18b3e304a2839a8286821b..582b41a91b10186a3aea74f831d6abb0f6c02b35 100644 (file)
@@ -20,6 +20,9 @@ do_configure[cleandirs] = "${B}"
 # Where the meson.build build configuration is
 MESON_SOURCEPATH = "${S}"
 
+# The target to build in do_compile. If unset the default targets are built.
+MESON_TARGET ?= ""
+
 def noprefix(var, d):
     return d.getVar(var).replace(d.getVar('prefix') + '/', '', 1)
 
@@ -170,7 +173,7 @@ do_configure[postfuncs] += "meson_do_qa_configure"
 
 do_compile[progress] = "outof:^\[(\d+)/(\d+)\]\s+"
 meson_do_compile() {
-    meson compile -v ${PARALLEL_MAKE}
+    meson compile -v ${PARALLEL_MAKE} ${MESON_TARGET}
 }
 
 meson_do_install() {