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?' fixQtBuiltinPaths "$dev/mkspecs" '*.pr?'
fi fi
} }
if [ -z "$dontPatchMkspecs" ]; then if [ -z "${dontPatchMkspecs-}" ]; then
postPhases="${postPhases}${postPhases:+ }postPatchMkspecs" postPhases="${postPhases}${postPhases:+ }postPatchMkspecs"
fi fi

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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