forked from mirrors/nixpkgs
Merge pull request #79593 from thefloweringash/wafhook-phases
wafHook: allow overriding phases and disabling of cross flags
This commit is contained in:
commit
46f8756aee
|
@ -11,17 +11,23 @@ wafConfigurePhase() {
|
|||
fi
|
||||
|
||||
local flagsArray=(
|
||||
@crossFlags@
|
||||
"${flagsArray[@]}"
|
||||
$wafConfigureFlags "${wafConfigureFlagsArray[@]}"
|
||||
${configureTargets:-configure}
|
||||
)
|
||||
if [ -z "${dontAddWafCrossFlags:-}" ]; then
|
||||
flagsArray+=(@crossFlags@)
|
||||
fi
|
||||
echoCmd 'configure flags' "${flagsArray[@]}"
|
||||
python "$wafPath" "${flagsArray[@]}"
|
||||
|
||||
runHook postConfigure
|
||||
}
|
||||
|
||||
if [ -z "${dontUseWafConfigure-}" -a -z "${configurePhase-}" ]; then
|
||||
configurePhase=wafConfigurePhase
|
||||
fi
|
||||
|
||||
wafBuildPhase () {
|
||||
runHook preBuild
|
||||
|
||||
|
@ -41,6 +47,10 @@ wafBuildPhase () {
|
|||
runHook postBuild
|
||||
}
|
||||
|
||||
if [ -z "${dontUseWafBuild-}" -a -z "${buildPhase-}" ]; then
|
||||
buildPhase=wafBuildPhase
|
||||
fi
|
||||
|
||||
wafInstallPhase() {
|
||||
runHook preInstall
|
||||
|
||||
|
@ -51,7 +61,7 @@ wafInstallPhase() {
|
|||
local flagsArray=(
|
||||
$wafFlags ${wafFlagsArray[@]}
|
||||
$installFlags ${installFlagsArray[@]}
|
||||
${installTargets:-install}
|
||||
${installTargets:-install}
|
||||
)
|
||||
|
||||
echoCmd 'install flags' "${flagsArray[@]}"
|
||||
|
@ -60,6 +70,6 @@ wafInstallPhase() {
|
|||
runHook postInstall
|
||||
}
|
||||
|
||||
configurePhase=wafConfigurePhase
|
||||
buildPhase=wafBuildPhase
|
||||
installPhase=wafInstallPhase
|
||||
if [ -z "${dontUseWafInstall-}" -a -z "${installPhase-}" ]; then
|
||||
installPhase=wafInstallPhase
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue