nixpkgs/pkgs/development/tools/build-managers/meson/setup-hook.sh

44 lines
1.0 KiB
Bash
Raw Normal View History

mesonConfigurePhase() {
runHook preConfigure
if [ -z "$dontAddPrefix" ]; then
mesonFlags="--prefix=$prefix $mesonFlags"
fi
# Build release by default.
2018-02-26 11:33:00 +00:00
if [ -n "@isCross@" ]; then
crossMesonFlags="--cross-file=@crossFile@/cross-file.conf"
fi
mesonFlags="${crossMesonFlags+$crossMesonFlags }--buildtype=${mesonBuildType:-release} $mesonFlags"
echo "meson flags: $mesonFlags ${mesonFlagsArray[@]}"
2018-02-26 11:33:00 +00:00
CC=@cc@/bin/cc CXX=@cc@/bin/c++ meson build $mesonFlags "${mesonFlagsArray[@]}"
cd build
if ! [[ -v enableParallelBuilding ]]; then
enableParallelBuilding=1
echo "meson: enabled parallel building"
fi
runHook postConfigure
}
if [ -z "$dontUseMesonConfigure" -a -z "$configurePhase" ]; then
setOutputFlags=
configurePhase=mesonConfigurePhase
fi
2018-01-02 04:50:50 +00:00
mesonCheckPhase() {
runHook preCheck
2018-02-18 15:24:50 +00:00
meson test --print-errorlogs
2018-01-02 04:50:50 +00:00
runHook postCheck
}
if [ -z "$dontUseMesonCheck" -a -z "$checkPhase" ]; then
checkPhase=mesonCheckPhase
fi