systemd/tools/meson-build.sh
Zbigniew Jędrzejewski-Szmek 9ee03516df tree-wide: add spdx header on all scripts and helpers
Even though many of those scripts are very simple, it is easier to include
the header than to try to say whether each of those files is trivial enough
not to require one.
2021-01-28 09:55:35 +01:00

22 lines
410 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"
[ -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"