Simplified counting CPUs.

Review URL: http://codereview.chromium.org/501153
This commit is contained in:
Alexey Marinichev 2009-12-21 11:42:39 -08:00
parent d3ab617757
commit 63c42aa811
4 changed files with 4 additions and 4 deletions

View File

@ -20,7 +20,7 @@ DEFAULT_CHROME_DIR="${CHROMEOS_CHROME_DIR:-/home/$USER/chrome}"
# The number of jobs to pass to tools that can run in parallel (such as make
# and dpkg-buildpackage
NUM_JOBS=`cat /proc/cpuinfo | grep processor | awk '{a++} END {print a}'`
NUM_JOBS=`grep -c "^processor" /proc/cpuinfo`
# Flags
DEFINE_string chrome_dir "$DEFAULT_CHROME_DIR" \

View File

@ -126,7 +126,7 @@ then
CONCURRENCY_LEVEL=2
else
# speed up compilation by running #cpus * 2 simultaneous jobs
CONCURRENCY_LEVEL=$(($(cat /proc/cpuinfo | grep "processor" | wc -l) * 2))
CONCURRENCY_LEVEL=$(($(grep -c "^processor" /proc/cpuinfo) * 2))
fi
# Build the kernel and make package. "setarch" is used so that scripts which

View File

@ -22,7 +22,7 @@ eval set -- "${FLAGS_ARGV}"
set -e
# Number of jobs for scons calls.
NUM_JOBS=`cat /proc/cpuinfo | grep processor | awk '{a++} END {print a}'`
NUM_JOBS=`grep -c "^processor" /proc/cpuinfo`
PLATFORM_DIR="$SRC_ROOT/platform"

View File

@ -12,7 +12,7 @@
# The number of jobs to pass to tools that can run in parallel (such as make
# and dpkg-buildpackage
NUM_JOBS=`cat /proc/cpuinfo | grep processor | awk '{a++} END {print a}'`
NUM_JOBS=`grep -c "^processor" /proc/cpuinfo`
# Store location of the calling script.
TOP_SCRIPT_DIR="${TOP_SCRIPT_DIR:-$(dirname $0)}"