From c6791b211767e8f4e4b1e90bc61b42b814f2e920 Mon Sep 17 00:00:00 2001 From: Andrew Childs Date: Sun, 9 Feb 2020 15:29:53 +0900 Subject: [PATCH] wafHook: allow overriding phases This makes the wafHook a lot closer to the structure of standard hooks like cmake and ninja. --- .../tools/build-managers/wafHook/setup-hook.sh | 14 +++++++++++--- 1 file 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