2017-08-27 19:42:21 +02:00
|
|
|
|
mesonConfigurePhase() {
|
|
|
|
|
runHook preConfigure
|
|
|
|
|
|
|
|
|
|
if [ -z "$dontAddPrefix" ]; then
|
|
|
|
|
mesonFlags="--prefix=$prefix $mesonFlags"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Build release by default.
|
2018-02-26 12:33:00 +01:00
|
|
|
|
if [ -n "@isCross@" ]; then
|
|
|
|
|
crossMesonFlags="--cross-file=@crossFile@/cross-file.conf"
|
|
|
|
|
fi
|
|
|
|
|
|
2018-03-05 07:08:18 +01:00
|
|
|
|
# See multiple-outputs.sh and meson’s coredata.py
|
|
|
|
|
mesonFlags="\
|
|
|
|
|
--libdir=${!outputLib}/lib --libexecdir=${!outputLib}/libexec \
|
|
|
|
|
--bindir=${!outputBin}/bin --sbindir=${!outputBin}/sbin \
|
|
|
|
|
--includedir=${!outputInclude}/include \
|
|
|
|
|
--mandir=${!outputMan}/share/man --infodir=${!outputInfo}/share/info \
|
|
|
|
|
--localedir=${!outputLib}/share/locale \
|
|
|
|
|
$mesonFlags"
|
|
|
|
|
|
2018-02-26 12:33:00 +01:00
|
|
|
|
mesonFlags="${crossMesonFlags+$crossMesonFlags }--buildtype=${mesonBuildType:-release} $mesonFlags"
|
2017-08-27 19:42:21 +02:00
|
|
|
|
|
|
|
|
|
echo "meson flags: $mesonFlags ${mesonFlagsArray[@]}"
|
|
|
|
|
|
2018-02-26 12:33:00 +01:00
|
|
|
|
CC=@cc@/bin/cc CXX=@cc@/bin/c++ meson build $mesonFlags "${mesonFlagsArray[@]}"
|
2017-08-27 19:42:21 +02:00
|
|
|
|
cd build
|
|
|
|
|
|
2017-12-02 07:49:59 +01:00
|
|
|
|
if ! [[ -v enableParallelBuilding ]]; then
|
|
|
|
|
enableParallelBuilding=1
|
|
|
|
|
echo "meson: enabled parallel building"
|
|
|
|
|
fi
|
|
|
|
|
|
2017-08-27 19:42:21 +02:00
|
|
|
|
runHook postConfigure
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if [ -z "$dontUseMesonConfigure" -a -z "$configurePhase" ]; then
|
|
|
|
|
setOutputFlags=
|
|
|
|
|
configurePhase=mesonConfigurePhase
|
|
|
|
|
fi
|
2018-01-02 05:50:50 +01:00
|
|
|
|
|
|
|
|
|
mesonCheckPhase() {
|
|
|
|
|
runHook preCheck
|
|
|
|
|
|
2018-02-18 16:24:50 +01:00
|
|
|
|
meson test --print-errorlogs
|
2018-01-02 05:50:50 +01:00
|
|
|
|
|
|
|
|
|
runHook postCheck
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if [ -z "$dontUseMesonCheck" -a -z "$checkPhase" ]; then
|
|
|
|
|
checkPhase=mesonCheckPhase
|
|
|
|
|
fi
|