2017-08-27 18:42:21 +01:00
|
|
|
|
mesonConfigurePhase() {
|
|
|
|
|
runHook preConfigure
|
|
|
|
|
|
2019-10-30 15:16:20 +00:00
|
|
|
|
if [ -z "${dontAddPrefix-}" ]; then
|
2017-08-27 18:42:21 +01:00
|
|
|
|
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
|
|
|
|
|
|
2018-03-05 06:08:18 +00: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 \
|
2019-06-19 02:17:42 +01:00
|
|
|
|
-Dauto_features=${mesonAutoFeatures:-enabled} \
|
2019-06-19 02:47:25 +01:00
|
|
|
|
-Dwrap_mode=${mesonWrapMode:-nodownload} \
|
2018-03-05 06:08:18 +00:00
|
|
|
|
$mesonFlags"
|
|
|
|
|
|
2019-06-19 02:48:05 +01:00
|
|
|
|
mesonFlags="${crossMesonFlags+$crossMesonFlags }--buildtype=${mesonBuildType:-plain} $mesonFlags"
|
2017-08-27 18:42:21 +01:00
|
|
|
|
|
|
|
|
|
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[@]}"
|
2017-08-27 18:42:21 +01:00
|
|
|
|
cd build
|
|
|
|
|
|
2017-12-02 06:49:59 +00:00
|
|
|
|
if ! [[ -v enableParallelBuilding ]]; then
|
|
|
|
|
enableParallelBuilding=1
|
|
|
|
|
echo "meson: enabled parallel building"
|
|
|
|
|
fi
|
|
|
|
|
|
2017-08-27 18:42:21 +01:00
|
|
|
|
runHook postConfigure
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-31 17:59:18 +00:00
|
|
|
|
if [ -z "${dontUseMesonConfigure-}" -a -z "${configurePhase-}" ]; then
|
2017-08-27 18:42:21 +01:00
|
|
|
|
setOutputFlags=
|
|
|
|
|
configurePhase=mesonConfigurePhase
|
|
|
|
|
fi
|