1 # shellcheck shell=bash disable=SC2206
6 if [ -n "$prefix" ]; then
10 if [ -z "${dontAddPrefix:-}" ] && [ -n "$prefix" ]; then
11 prependToVar buildFlags
"${prefixKey:-prefix=}$prefix"
15 ${enableParallelBuilding:+-j${NIX_BUILD_CORES}}
17 concatTo flagsArray sconsFlags sconsFlagsArray buildFlags buildFlagsArray
19 echoCmd
'scons build flags' "${flagsArray[@]}"
20 scons
"${flagsArray[@]}"
28 if [ -n "$prefix" ]; then
32 if [ -z "${dontAddPrefix:-}" ] && [ -n "$prefix" ]; then
33 prependToVar installFlags
"${prefixKey:-prefix=}$prefix"
37 ${enableParallelInstalling:+-j${NIX_BUILD_CORES}}
39 concatTo flagsArray sconsFlags sconsFlagsArray installFlags installFlagsArray installTargets
=install
41 echoCmd
'scons install flags' "${flagsArray[@]}"
42 scons
"${flagsArray[@]}"
50 if [ -z "${checkTarget:-}" ]; then
51 if scons
-n check
>/dev
/null
2>&1; then
53 elif scons
-n test >/dev
/null
2>&1; then
58 if [ -z "${checkTarget:-}" ]; then
59 echo "no check/test target found, doing nothing"
62 ${enableParallelChecking:+-j${NIX_BUILD_CORES}}
64 concatTo flagsArray sconsFlags sconsFlagsArray checkFlagsArray checkTarget
66 echoCmd
'scons check flags' "${flagsArray[@]}"
67 scons
"${flagsArray[@]}"
73 if [ -z "${dontUseSconsBuild-}" ] && [ -z "${buildPhase-}" ]; then
74 buildPhase
=sconsBuildPhase
77 if [ -z "${dontUseSconsCheck-}" ] && [ -z "${checkPhase-}" ]; then
78 checkPhase
=sconsCheckPhase
81 if [ -z "${dontUseSconsInstall-}" ] && [ -z "${installPhase-}" ]; then
82 installPhase
=sconsInstallPhase