]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
meson: Allow user to override setup command options
authorTom Hochstein <tom.hochstein@oss.nxp.com>
Thu, 17 Apr 2025 18:08:28 +0000 (13:08 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 1 May 2025 13:20:18 +0000 (14:20 +0100)
The user cannot override the setup command options --cross-file and
--native-file because the meson-wrapper places these options on the
command line after the user options. This problem was noticed when
trying to build with an SDK using a custom cross-file.

Signed-off-by: Tom Hochstein <tom.hochstein@oss.nxp.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/meson/meson/meson-wrapper

index 74559852978c1441cfd1ac5858d2950c36ff0a25..3aa1a93520c8751cd67b2219c2b50e24c836b879 100755 (executable)
@@ -14,8 +14,14 @@ fi
 unset CC CXX CPP LD AR NM STRIP
 
 case "$1" in
-setup|configure|dist|install|introspect|init|test|wrap|subprojects|rewrite|compile|devenv|env2mfile|help) MESON_CMD="$1" ;;
-*) echo meson-wrapper: Implicit setup command assumed; MESON_CMD=setup ;;
+setup|configure|dist|install|introspect|init|test|wrap|subprojects|rewrite|compile|devenv|env2mfile|help)
+    MESON_CMD="$1"
+    shift
+    ;;
+*)
+    MESON_CMD=setup
+    echo meson-wrapper: Implicit setup command assumed
+    ;;
 esac
 
 if [ "$MESON_CMD" = "setup" ]; then
@@ -27,5 +33,6 @@ if [ "$MESON_CMD" = "setup" ]; then
 fi
 
 exec "$OECORE_NATIVE_SYSROOT/usr/bin/meson.real" \
-    "$@" \
-    $MESON_SETUP_OPTS
+    $MESON_CMD \
+    $MESON_SETUP_OPTS \
+    "$@"