about summary refs log tree commit diff
path: root/pkgs/development/tools/build-managers
diff options
context:
space:
mode:
authorAndrew Childs <lorne@cons.org.nz>2020-02-09 15:29:53 +0900
committerAndrew Childs <lorne@cons.org.nz>2020-02-09 16:03:02 +0900
commitc6791b211767e8f4e4b1e90bc61b42b814f2e920 (patch)
tree40fa34e3f3a3c5d9d828c3680c42057c0237ed22 /pkgs/development/tools/build-managers
parentf84107c857b141eed3cc6325e6f0c4aadceb7b3d (diff)
downloadnixlib-c6791b211767e8f4e4b1e90bc61b42b814f2e920.tar
nixlib-c6791b211767e8f4e4b1e90bc61b42b814f2e920.tar.gz
nixlib-c6791b211767e8f4e4b1e90bc61b42b814f2e920.tar.bz2
nixlib-c6791b211767e8f4e4b1e90bc61b42b814f2e920.tar.lz
nixlib-c6791b211767e8f4e4b1e90bc61b42b814f2e920.tar.xz
nixlib-c6791b211767e8f4e4b1e90bc61b42b814f2e920.tar.zst
nixlib-c6791b211767e8f4e4b1e90bc61b42b814f2e920.zip
wafHook: allow overriding phases
This makes the wafHook a lot closer to the structure of standard hooks
like cmake and ninja.
Diffstat (limited to 'pkgs/development/tools/build-managers')
-rw-r--r--pkgs/development/tools/build-managers/wafHook/setup-hook.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/pkgs/development/tools/build-managers/wafHook/setup-hook.sh b/pkgs/development/tools/build-managers/wafHook/setup-hook.sh
index 3da86d3201f5..0cce57677bde 100644
--- a/pkgs/development/tools/build-managers/wafHook/setup-hook.sh
+++ b/pkgs/development/tools/build-managers/wafHook/setup-hook.sh
@@ -22,6 +22,10 @@ wafConfigurePhase() {
     runHook postConfigure
 }
 
+if [ -z "${dontUseWafConfigure-}" -a -z "${configurePhase-}" ]; then
+    configurePhase=wafConfigurePhase
+fi
+
 wafBuildPhase () {
     runHook preBuild
 
@@ -41,6 +45,10 @@ wafBuildPhase () {
     runHook postBuild
 }
 
+if [ -z "${dontUseWafBuild-}" -a -z "${buildPhase-}" ]; then
+    buildPhase=wafBuildPhase
+fi
+
 wafInstallPhase() {
     runHook preInstall
 
@@ -60,6 +68,6 @@ wafInstallPhase() {
     runHook postInstall
 }
 
-configurePhase=wafConfigurePhase
-buildPhase=wafBuildPhase
-installPhase=wafInstallPhase
+if [ -z "${dontUseWafInstall-}" -a -z "${installPhase-}" ]; then
+    installPhase=wafInstallPhase
+fi