3
0
Fork 0
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:
Matthew Bauer 2020-03-22 01:59:41 -04:00 committed by GitHub
commit 46f8756aee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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