From: Vyacheslav Yurkov Date: Tue, 4 Feb 2025 10:53:14 +0000 (+0100) Subject: meson.bbclass: Add an option to specify install tags X-Git-Tag: yocto-5.2~512 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a61ec67cb6f240c7593c9dd1b9a1ef5fff87c855;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git meson.bbclass: Add an option to specify install tags The feature is available since meson 0.60.0. You can specify comma-separated list of install tags (not targets). Signed-off-by: Vyacheslav Yurkov Signed-off-by: Richard Purdie --- diff --git a/meta/classes-recipe/meson.bbclass b/meta/classes-recipe/meson.bbclass index b343480f9a7..cbfc45b94bb 100644 --- a/meta/classes-recipe/meson.bbclass +++ b/meta/classes-recipe/meson.bbclass @@ -22,6 +22,9 @@ MESON_SOURCEPATH = "${S}" # The target to build in do_compile. If unset the default targets are built. MESON_TARGET ?= "" +# Since 0.60.0 you can specify custom tags to install +MESON_INSTALL_TAGS ?= "" + def noprefix(var, d): return d.getVar(var).replace(d.getVar('prefix') + '/', '', 1) @@ -182,7 +185,10 @@ meson_do_compile() { } meson_do_install() { - meson install --destdir ${D} --no-rebuild + if [ "x${MESON_INSTALL_TAGS}" != "x" ] ; then + meson_install_tags="--tags ${MESON_INSTALL_TAGS}" + fi + meson install --destdir ${D} --no-rebuild $meson_install_tags } EXPORT_FUNCTIONS do_configure do_compile do_install