lol

meson/setup-hook.sh: make build directory configurable

authored by

Valentin Gagarin and committed by
John Ericson
1ceba936 968e5b2a

+14 -2
+10
doc/hooks/meson.section.md
··· 18 18 19 19 Controls the flags passed to `meson setup` during configure phase. 20 20 21 + #### `mesonBuildDir` {#meson-build-dir} 22 + 23 + Directory where Meson will put intermediate files. 24 + 25 + Setting this can be useful for debugging multiple Meson builds while in the same source directory, for example, when building for different platforms. 26 + Different values for each build will prevent build artefacts from interefering with each other. 27 + This setting has no tangible effect when running the build in a sandboxed derivation. 28 + 29 + The default value is `build`. 30 + 21 31 #### `mesonWrapMode` {#meson-wrap-mode} 22 32 23 33 Which value is passed as
+4 -2
pkgs/by-name/me/meson/setup-hook.sh
··· 3 3 mesonConfigurePhase() { 4 4 runHook preConfigure 5 5 6 + : ${mesonBuildDir:=build} 7 + 6 8 local flagsArray=() 7 9 8 10 if [ -z "${dontAddPrefix-}" ]; then ··· 28 30 29 31 echoCmd 'mesonConfigurePhase flags' "${flagsArray[@]}" 30 32 31 - meson setup build "${flagsArray[@]}" 32 - cd build || { echoCmd 'mesonConfigurePhase' "could not cd to build"; exit 1; } 33 + meson setup "$mesonBuildDir" "${flagsArray[@]}" 34 + cd "$mesonBuildDir" || { echoCmd 'mesonConfigurePhase' "could not cd to $mesonBuildDir"; exit 1; } 33 35 34 36 if ! [[ -v enableParallelBuilding ]]; then 35 37 enableParallelBuilding=1