Make default parallelization controllable.

Specifically, do this via env for the time being since each program
doesn't necessarily have an option (nor warrant one).

BUG=None
TEST=None

Change-Id: I26e7f06ad5d6a44a7826bfa8465b34154d21b6a3
Reviewed-on: https://gerrit.chromium.org/gerrit/22295
Tested-by: Brian Harring <ferringb@chromium.org>
Commit-Ready: Brian Harring <ferringb@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
This commit is contained in:
Brian Harring 2012-05-09 15:26:09 -07:00 committed by Gerrit
parent 34e0f953e3
commit 28bb01f53e

View File

@ -10,7 +10,11 @@
# The number of jobs to pass to tools that can run in parallel (such as make # The number of jobs to pass to tools that can run in parallel (such as make
# and dpkg-buildpackage # and dpkg-buildpackage
if [ -z "${NUM_JOBS}" ]; then
NUM_JOBS=$(grep -c "^processor" /proc/cpuinfo) NUM_JOBS=$(grep -c "^processor" /proc/cpuinfo)
fi
# Ensure that any sub scripts we invoke get the max proc count.
export NUM_JOBS="${NUM_JOBS}"
# True if we have the 'pv' utility - also set up COMMON_PV_CAT for convenience # True if we have the 'pv' utility - also set up COMMON_PV_CAT for convenience
COMMON_PV_OK=1 COMMON_PV_OK=1