1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 06:25:37 +03:00
systemd/tools/meson-build.sh

23 lines
442 B
Bash
Raw Normal View History

#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eux
src="$1"
dst="$2"
target="$3"
options="$4"
CC="$5"
CXX="$6"
2021-09-29 22:28:55 +03:00
# shellcheck disable=SC2086
[ -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.
2021-09-29 22:28:55 +03:00
ninja="ninja"
2022-05-22 18:13:44 +03:00
if command -v ninja-build >/dev/null ; then
2021-09-29 22:28:55 +03:00
ninja="ninja-build"
fi
"$ninja" -C "$dst" "$target"