summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Gagarin <valentin@gagarin.work>2024-09-18 21:54:02 +0200
committerValentin Gagarin <valentin@gagarin.work>2024-09-18 22:00:57 +0200
commite365541c390eeff9417152dd5821cf16ea3f0554 (patch)
treea4d24f7b380872ec61093c2ee5bf21ae9fee2d10
parentmesa: 24.2.2 -> 24.2.3 (#342854) (diff)
downloadnixpkgs-e365541c390eeff9417152dd5821cf16ea3f0554.tar.gz
meson/setup-hook.sh: make build directory configurable
-rw-r--r--pkgs/by-name/me/meson/setup-hook.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/by-name/me/meson/setup-hook.sh b/pkgs/by-name/me/meson/setup-hook.sh
index 55ea8b5c1d97..a88a276f09a8 100644
--- a/pkgs/by-name/me/meson/setup-hook.sh
+++ b/pkgs/by-name/me/meson/setup-hook.sh
@@ -3,6 +3,8 @@
mesonConfigurePhase() {
runHook preConfigure
+ : ${mesonBuildDir:=build}
+
local flagsArray=()
if [ -z "${dontAddPrefix-}" ]; then
@@ -28,8 +30,8 @@ mesonConfigurePhase() {
echoCmd 'mesonConfigurePhase flags' "${flagsArray[@]}"
- meson setup build "${flagsArray[@]}"
- cd build || { echoCmd 'mesonConfigurePhase' "could not cd to build"; exit 1; }
+ meson setup "$mesonBuildDir" "${flagsArray[@]}"
+ cd "$mesonBuildDir" || { echoCmd 'mesonConfigurePhase' "could not cd to $mesonBuildDir"; exit 1; }
if ! [[ -v enableParallelBuilding ]]; then
enableParallelBuilding=1