diff options
Diffstat (limited to 'envsetup.sh')
-rw-r--r-- | envsetup.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/envsetup.sh b/envsetup.sh index 8da5173..8a97863 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -13,6 +13,8 @@ Invoke ". build/envsetup.sh" from your shell to add the following functions to y - mmp: Builds all of the modules in the current directory and pushes them to the device. - mmmp: Builds all of the modules in the supplied directories and pushes them to the device. - mmma: Builds all of the modules in the supplied directories, and their dependencies. +- mms: Short circuit builder. Quickly re-build the kernel, rootfs, boot and system images + without deep dependencies. Requires the full build to have run before. - cgrep: Greps on all local C/C++ files. - ggrep: Greps on all local Gradle files. - jgrep: Greps on all local Java files. @@ -2129,6 +2131,30 @@ function cmka() { fi } +function mms() { + local T=$(gettop) + if [ -z "$T" ] + then + echo "Couldn't locate the top of the tree. Try setting TOP." + return 1 + fi + + case `uname -s` in + Darwin) + local NUM_CPUS=$(sysctl hw.ncpu|cut -d" " -f2) + ONE_SHOT_MAKEFILE="__none__" \ + make -C $T -j $NUM_CPUS "$@" + ;; + *) + local NUM_CPUS=$(cat /proc/cpuinfo | grep "^processor" | wc -l) + ONE_SHOT_MAKEFILE="__none__" \ + mk_timer schedtool -B -n 1 -e ionice -n 1 \ + make -C $T -j $NUM_CPUS "$@" + ;; + esac +} + + function repolastsync() { RLSPATH="$ANDROID_BUILD_TOP/.repo/.repo_fetchtimes.json" RLSLOCAL=$(date -d "$(stat -c %z $RLSPATH)" +"%e %b %Y, %T %Z") |