diff options
author | Ying Wang <wangying@google.com> | 2013-08-20 15:16:58 -0700 |
---|---|---|
committer | Ying Wang <wangying@google.com> | 2013-08-22 17:05:06 -0700 |
commit | bcd9f583ccb7db6329ba42f2795af5ef53fa5f7f (patch) | |
tree | f2945dc73510743687e299bdbb5c5f72bb88dd60 /eclipse/scripts | |
parent | 5c9cde6dfb1e114cc13f3258b8ee04edb53f0d7b (diff) | |
download | sdk-bcd9f583ccb7db6329ba42f2795af5ef53fa5f7f.zip sdk-bcd9f583ccb7db6329ba42f2795af5ef53fa5f7f.tar.gz sdk-bcd9f583ccb7db6329ba42f2795af5ef53fa5f7f.tar.bz2 |
Don't recursively make when calling create_all_symlinks.sh from a makefile.
The target files should be built as dependencies in the rules that call
create_all_symlinks.sh. We already did this in
sdk/adtproductbuild/Android.mk
and
sdk/monitor/Android.mk.
Bug: 10347826
Change-Id: I465d227baa7c22ad806652ca7eb20262a4bccf6f
Diffstat (limited to 'eclipse/scripts')
-rwxr-xr-x | eclipse/scripts/create_all_symlinks.sh | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/eclipse/scripts/create_all_symlinks.sh b/eclipse/scripts/create_all_symlinks.sh index a464f51..45cd159 100755 --- a/eclipse/scripts/create_all_symlinks.sh +++ b/eclipse/scripts/create_all_symlinks.sh @@ -316,23 +316,24 @@ done MAKE_TARGETS="$NEW_TARGETS" unset NEW_TARGETS - -if [[ -n $MAKE_TARGETS ]]; then - ( # Make sure we have lunch sdk-<something> - if [[ ! "$TARGET_PRODUCT" ]]; then - warn "## TARGET_PRODUCT is not set, running build/envsetup.sh" - . build/envsetup.sh - warn "## lunch sdk-eng" - lunch sdk-eng - fi - - J="4" - [[ $(uname) == "Darwin" ]] && J=$(sysctl hw.ncpu | cut -d : -f 2 | tr -d ' ') - [[ $(uname) == "Linux" ]] && J=$(cat /proc/cpuinfo | grep processor | wc -l) - - warn "## Building libs: make -j$J $MAKE_TARGETS" - make -j${J} $MAKE_TARGETS - ) +if [[ -z $ONLY_COPY_DEPS ]]; then + if [[ -n $MAKE_TARGETS ]]; then + ( # Make sure we have lunch sdk-<something> + if [[ ! "$TARGET_PRODUCT" ]]; then + warn "## TARGET_PRODUCT is not set, running build/envsetup.sh" + . build/envsetup.sh + warn "## lunch sdk-eng" + lunch sdk-eng + fi + + J="4" + [[ $(uname) == "Darwin" ]] && J=$(sysctl hw.ncpu | cut -d : -f 2 | tr -d ' ') + [[ $(uname) == "Linux" ]] && J=$(cat /proc/cpuinfo | grep processor | wc -l) + + warn "## Building libs: make -j$J $MAKE_TARGETS" + make -j${J} $MAKE_TARGETS + ) + fi fi # --- Copy resulting files --- |