summaryrefslogtreecommitdiffstats
path: root/envsetup.sh
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2012-08-27 00:08:43 -0700
committerRicardo Cerqueira <cyanogenmod@cerqueira.org>2012-11-17 17:56:51 +0000
commitaccc707c4679dfc706983d66cfa1ccd50ef7ed6d (patch)
treebb80510fb0e74b2d7efd01f1b18707dbb92abb92 /envsetup.sh
parent9e326014c6a576e2be8dd54a3a93ea9334e1c280 (diff)
downloadbuild-accc707c4679dfc706983d66cfa1ccd50ef7ed6d.zip
build-accc707c4679dfc706983d66cfa1ccd50ef7ed6d.tar.gz
build-accc707c4679dfc706983d66cfa1ccd50ef7ed6d.tar.bz2
Revert "envsetup: mka improvements"
This reverts commit 1e7a791feb5c0ca789c53f2490af24283472815f.
Diffstat (limited to 'envsetup.sh')
-rw-r--r--envsetup.sh18
1 files changed, 7 insertions, 11 deletions
diff --git a/envsetup.sh b/envsetup.sh
index a7396c8..5753250 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -13,11 +13,11 @@ Invoke ". build/envsetup.sh" from your shell to add the following functions to y
- jgrep: Greps on all local Java files.
- resgrep: Greps on all local res/*.xml files.
- godir: Go to the directory containing a file.
-- cmremote: Add git remote for CM Gerrit Review.
-- cmgerrit: A Git wrapper that fetches/pushes patch from/to CM Gerrit Review.
-- cmrebase: Rebase a Gerrit change and push it again.
-- mka: Builds using SCHED_BATCH on all processors.
-- reposync: Parallel repo sync using ionice and SCHED_BATCH.
+- cmremote: Add git remote for CM Gerrit Review
+- cmgerrit: A Git wrapper that fetches/pushes patch from/to CM Gerrit Review
+- cmrebase: Rebase a Gerrit change and push it again
+- mka: Builds using SCHED_BATCH on all processors
+- reposync: Parallel repo sync using ionice and SCHED_BATCH
Look at the source to view more functions. The complete list is:
EOF
@@ -1641,14 +1641,10 @@ function cmrebase() {
function mka() {
case `uname -s` in
Darwin)
- local threads=`sysctl hw.ncpu|cut -d" " -f2`
- local load=`expr $threads \* 2`
- make -j -l $load "$@"
+ make -j `sysctl hw.ncpu|cut -d" " -f2` "$@"
;;
*)
- local threads=`grep "^processor" /proc/cpuinfo | wc -l`
- local load=`expr $threads \* 2`
- schedtool -B -n 1 -e ionice -n 1 make -j -l $load "$@"
+ schedtool -B -n 1 -e ionice -n 1 make -j `cat /proc/cpuinfo | grep "^processor" | wc -l` "$@"
;;
esac
}