1 # shellcheck shell=bash disable=SC2206
6 if [ -n "$prefix" ]; then
10 if [ -z "${dontAddPrefix:-}" ] && [ -n "$prefix" ]; then
11 buildFlags
="${prefixKey:-prefix=}$prefix $buildFlags"
15 ${enableParallelBuilding:+-j${NIX_BUILD_CORES}}
16 $sconsFlags ${sconsFlagsArray[@]}
17 $buildFlags ${buildFlagsArray[@]}
20 echoCmd
'scons build flags' "${flagsArray[@]}"
21 scons
"${flagsArray[@]}"
29 if [ -n "$prefix" ]; then
33 if [ -z "${dontAddPrefix:-}" ] && [ -n "$prefix" ]; then
34 installFlags
="${prefixKey:-prefix=}$prefix $installFlags"
38 ${enableParallelInstalling:+-j${NIX_BUILD_CORES}}
39 $sconsFlags ${sconsFlagsArray[@]}
40 $installFlags ${installFlagsArray[@]}
41 ${installTargets:-install}
44 echoCmd
'scons install flags' "${flagsArray[@]}"
45 scons
"${flagsArray[@]}"
53 if [ -z "${checkTarget:-}" ]; then
54 if scons
-n check
>/dev
/null
2>&1; then
56 elif scons
-n test >/dev
/null
2>&1; then
61 if [ -z "${checkTarget:-}" ]; then
62 echo "no check/test target found, doing nothing"
65 ${enableParallelChecking:+-j${NIX_BUILD_CORES}}
66 $sconsFlags ${sconsFlagsArray[@]}
70 echoCmd
'scons check flags' "${flagsArray[@]}"
71 scons
"${flagsArray[@]}"
77 if [ -z "${dontUseSconsBuild-}" ] && [ -z "${buildPhase-}" ]; then
78 buildPhase
=sconsBuildPhase
81 if [ -z "${dontUseSconsCheck-}" ] && [ -z "${checkPhase-}" ]; then
82 checkPhase
=sconsCheckPhase
85 if [ -z "${dontUseSconsInstall-}" ] && [ -z "${installPhase-}" ]; then
86 installPhase
=sconsInstallPhase