diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2011-10-16 11:26:26 (GMT) |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2011-10-16 11:26:26 (GMT) |
commit | 6e00f49ab44487694fd0e68a3f4b2c4f43f72afe (patch) | |
tree | 6b8a214f9c643a68add55ab22590c41b56a03754 /scripts/crosstool-NG.sh.in | |
parent | f81519065bac8f2b7bb3c8a43dc32c43b2d21210 (diff) |
config: use '0' for automatic number of jobs
Also, make it the default.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Diffstat (limited to 'scripts/crosstool-NG.sh.in')
-rw-r--r-- | scripts/crosstool-NG.sh.in | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in index c7893ca..2a54a86 100644 --- a/scripts/crosstool-NG.sh.in +++ b/scripts/crosstool-NG.sh.in @@ -469,9 +469,6 @@ if [ -z "${CT_RESTART}" ]; then [ "${CT_USE_PIPES}" = "y" ] && CT_CFLAGS_FOR_HOST+=" -pipe" CT_CFLAGS_FOR_HOST+="${CT_EXTRA_FLAGS_FOR_HOST}" - # Override the configured jobs with what's been given on the command line - [ -n "${CT_JOBS}" ] && CT_PARALLEL_JOBS="${CT_JOBS}" - # Set the shell to be used by ./configure scripts and by Makefiles (those # that support it!). export CONFIG_SHELL="${CT_CONFIG_SHELL}" # for ./configure @@ -479,10 +476,12 @@ if [ -z "${CT_RESTART}" ]; then # And help make go faster JOBSFLAGS= + # Override the configured jobs with what's been given on the command line + [ -n "${CT_JOBS}" ] && CT_PARALLEL_JOBS="${CT_JOBS}" # Use the number of processors+1 when automatically setting the number of # parallel jobs. Fall back to 1 if the host doesn't use GLIBC. AUTO_JOBS=$((`getconf _NPROCESSORS_ONLN 2> /dev/null || echo 0` + 1)) - [ ${CT_PARALLEL_JOBS} -eq -1 ] && JOBSFLAGS="${JOBSFLAGS} -j${AUTO_JOBS}" + [ ${CT_PARALLEL_JOBS} -eq 0 ] && JOBSFLAGS="${JOBSFLAGS} -j${AUTO_JOBS}" [ ${CT_PARALLEL_JOBS} -gt 0 ] && JOBSFLAGS="${JOBSFLAGS} -j${CT_PARALLEL_JOBS}" [ ${CT_LOAD} -ne 0 ] && JOBSFLAGS="${JOBSFLAGS} -l${CT_LOAD}" |