treewide: Make more dont* variables OK to be undefined in setup hooks

This commit is contained in:
John Ericson 2019-10-30 15:16:20 +00:00
parent 3835442cf0
commit 1290e532ea
7 changed files with 14 additions and 14 deletions

View File

@ -61,6 +61,6 @@ postPatchMkspecs() {
fixQtBuiltinPaths "$dev/mkspecs" '*.pr?'
fi
}
if [ -z "$dontPatchMkspecs" ]; then
if [ -z "${dontPatchMkspecs-}" ]; then
postPhases="${postPhases}${postPhases:+ }postPatchMkspecs"
fi

View File

@ -20,17 +20,17 @@ cmakeConfigurePhase() {
export CTEST_PARALLEL_LEVEL=$NIX_BUILD_CORES
fi
if [ -z "$dontFixCmake" ]; then
if [ -z "${dontFixCmake-}" ]; then
fixCmakeFiles .
fi
if [ -z "$dontUseCmakeBuildDir" ]; then
if [ -z "${dontUseCmakeBuildDir-}" ]; then
mkdir -p build
cd build
cmakeDir=${cmakeDir:-..}
fi
if [ -z "$dontAddPrefix" ]; then
if [ -z "${dontAddPrefix-}" ]; then
cmakeFlags="-DCMAKE_INSTALL_PREFIX=$prefix $cmakeFlags"
fi
@ -84,7 +84,7 @@ cmakeConfigurePhase() {
cmakeFlags="-DCMAKE_INSTALL_LOCALEDIR=${!outputLib}/share/locale $cmakeFlags"
# Dont build tests when doCheck = false
if [ -z "$doCheck" ]; then
if [ -z "${doCheck-}" ]; then
cmakeFlags="-DBUILD_TESTING=OFF $cmakeFlags"
fi
@ -115,7 +115,7 @@ cmakeConfigurePhase() {
runHook postConfigure
}
if [ -z "$dontUseCmakeConfigure" -a -z "$configurePhase" ]; then
if [ -z "${dontUseCmakeConfigure-}" -a -z "$configurePhase" ]; then
setOutputFlags=
configurePhase=cmakeConfigurePhase
fi

View File

@ -9,6 +9,6 @@ gnConfigurePhase() {
runHook postConfigure
}
if [ -z "$dontUseGnConfigure" -a -z "$configurePhase" ]; then
if [ -z "${dontUseGnConfigure-}" -a -z "$configurePhase" ]; then
configurePhase=gnConfigurePhase
fi

View File

@ -1,7 +1,7 @@
mesonConfigurePhase() {
runHook preConfigure
if [ -z "$dontAddPrefix" ]; then
if [ -z "${dontAddPrefix-}" ]; then
mesonFlags="--prefix=$prefix $mesonFlags"
fi
@ -36,7 +36,7 @@ mesonConfigurePhase() {
runHook postConfigure
}
if [ -z "$dontUseMesonConfigure" -a -z "$configurePhase" ]; then
if [ -z "${dontUseMesonConfigure-}" -a -z "$configurePhase" ]; then
setOutputFlags=
configurePhase=mesonConfigurePhase
fi

View File

@ -19,7 +19,7 @@ ninjaBuildPhase() {
runHook postBuild
}
if [ -z "$dontUseNinjaBuild" -a -z "$buildPhase" ]; then
if [ -z "${dontUseNinjaBuild-}" -a -z "$buildPhase" ]; then
buildPhase=ninjaBuildPhase
fi
@ -38,7 +38,7 @@ ninjaInstallPhase() {
runHook postInstall
}
if [ -z "$dontUseNinjaInstall" -a -z "$installPhase" ]; then
if [ -z "${dontUseNinjaInstall-}" -a -z "$installPhase" ]; then
installPhase=ninjaInstallPhase
fi
@ -73,6 +73,6 @@ ninjaCheckPhase() {
runHook postCheck
}
if [ -z "$dontUseNinjaCheck" -a -z "$checkPhase" ]; then
if [ -z "${dontUseNinjaCheck-}" -a -z "$checkPhase" ]; then
checkPhase=ninjaCheckPhase
fi

View File

@ -75,7 +75,7 @@ if [ -z "$buildPhase" ]; then
buildPhase=sconsBuildPhase
fi
if [ -z "$dontUseSconsInstall" -a -z "$installPhase" ]; then
if [ -z "${dontUseSconsInstall-}" -a -z "$installPhase" ]; then
installPhase=sconsInstallPhase
fi

View File

@ -14,6 +14,6 @@ imakeConfigurePhase() {
runHook postConfigure
}
if [ -z "$dontUseImakeConfigure" -a -z "$configurePhase" ]; then
if [ -z "${dontUseImakeConfigure-}" -a -z "$configurePhase" ]; then
configurePhase=imakeConfigurePhase
fi