]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - tools/meson-build.sh
doc: update os-release spec with new path for container host's file
[thirdparty/systemd.git] / tools / meson-build.sh
index 302749d8ed71ceec641a0de0824eee9118fb15e7..dea554177db6dff208bb007e2f378332202fcc83 100755 (executable)
@@ -5,6 +5,16 @@ src="$1"
 dst="$2"
 target="$3"
 options="$4"
+CC="$5"
+CXX="$6"
 
-[ -d "$dst" ] || meson "$src" "$dst" $options
-ninja -C "$dst" "$target"
+[ -f "$dst/ninja.build" ] || CC="$CC" CXX="$CXX" meson "$src" "$dst" $options
+
+# Locate ninja binary, on CentOS 7 it is called ninja-build, so
+# use that name if available.
+ninja=ninja
+if which ninja-build >/dev/null 2>&1 ; then
+    ninja=ninja-build
+fi
+
+"$ninja" -C "$dst" "$target"