systemd/tools/meson-build.sh
Yu Watanabe e3b2f7c056 tools: explicitly specify "setup" subcommand
As invoking meson without subcommand is deprecated since 0.64.0.
2023-03-03 20:06:30 +09:00

23 lines
448 B
Bash
Executable file

#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eux
src="$1"
dst="$2"
target="$3"
options="$4"
CC="$5"
CXX="$6"
# shellcheck disable=SC2086
[ -f "$dst/build.ninja" ] || CC="$CC" CXX="$CXX" meson setup "$src" "$dst" $options
# Locate ninja binary, on CentOS 7 it is called ninja-build, so
# use that name if available.
ninja="ninja"
if command -v ninja-build >/dev/null ; then
ninja="ninja-build"
fi
"$ninja" -C "$dst" "$target"