mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
setup.sh: add -j and -l options
svn path=/nixpkgs/branches/stdenv-updates/; revision=22283
This commit is contained in:
parent
4f1075c40b
commit
3c14e712ca
1 changed files with 11 additions and 1 deletions
|
@ -79,9 +79,19 @@ cmd(){
|
|||
}
|
||||
|
||||
runMake(){
|
||||
cmd make ${makefile:+-f $makefile} "$@"
|
||||
local optout=NO_PARALLEL_BUILD_${curPhase}
|
||||
[ -n "${!optout}" ] || \
|
||||
local j="$makeFlagsParallelBuild"
|
||||
cmd make ${makefile:+-f $makefile} "$@" $j
|
||||
}
|
||||
|
||||
######################################################################
|
||||
# parallel builds: opt-out
|
||||
# - in a phase: set NO_PARALLEL_BUILD_${PHASE_NAME}
|
||||
# - for this build: pass NUM_CORES=1 to the builder
|
||||
if [ "$NUM_CORES" != 1 ]; then
|
||||
makeFlagsParallelBuild="-j $NIX_MAX_PARALLELIZATION -l $NIX_TARGET_LOAD"
|
||||
fi
|
||||
|
||||
######################################################################
|
||||
# Initialisation.
|
||||
|
|
Loading…
Reference in a new issue