wafHook: allow overriding phases

This makes the wafHook a lot closer to the structure of standard hooks
like cmake and ninja.
This commit is contained in:
Andrew Childs 2020-02-09 15:29:53 +09:00
parent f84107c857
commit c6791b2117

View file

@ -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