--- /opt/androvm-4.1.1/build/envsetup.sh 2013-08-29 03:44:27.000000000 +0200 +++ build/envsetup.sh 2013-08-29 11:50:37.654461507 +0200 @@ -12,10 +12,10 @@ Look at the source to view more functions. The complete list is: EOF - T=$(gettop) + TOP=$(gettop) local A A="" - for i in `cat $T/build/envsetup.sh | sed -n "/^function /s/function \([a-z_]*\).*/\1/p" | sort`; do + for i in `cat $TOP/build/envsetup.sh | sed -n "/^function /s/function \([a-z_]*\).*/\1/p" | sort`; do A="$A $i" done echo $A @@ -24,32 +24,32 @@ # Get the value of a build variable as an absolute path. function get_abs_build_var() { - T=$(gettop) - if [ ! "$T" ]; then + TOP=$(gettop) + if [ ! "$TOP" ]; then echo "Couldn't locate the top of the tree. Try setting TOP." >&2 return fi - (cd $T; CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core \ - make --no-print-directory -C "$T" -f build/core/config.mk dumpvar-abs-$1) + (cd $TOP; CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core \ + make --no-print-directory -C "$TOP" -f build/core/config.mk dumpvar-abs-$1) } # Get the exact value of a build variable. function get_build_var() { - T=$(gettop) - if [ ! "$T" ]; then + TOP=$(gettop) + if [ ! "$TOP" ]; then echo "Couldn't locate the top of the tree. Try setting TOP." >&2 return fi CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core \ - make --no-print-directory -C "$T" -f build/core/config.mk dumpvar-$1 + make --no-print-directory -C "$TOP" -f build/core/config.mk dumpvar-$1 } # check to see if the supplied product is one we can build function check_product() { - T=$(gettop) - if [ ! "$T" ]; then + TOP=$(gettop) + if [ ! "$TOP" ]; then echo "Couldn't locate the top of the tree. Try setting TOP." >&2 return fi @@ -79,8 +79,8 @@ function setpaths() { - T=$(gettop) - if [ ! "$T" ]; then + TOP=$(gettop) + if [ ! "$TOP" ]; then echo "Couldn't locate the top of the tree. Try setting TOP." return fi @@ -147,8 +147,8 @@ fi export ANDROID_TOOLCHAIN=$ANDROID_EABI_TOOLCHAIN - export ANDROID_QTOOLS=$T/development/emulator/qtools - export ANDROID_DEV_SCRIPTS=$T/development/scripts + export ANDROID_QTOOLS=$TOP/development/emulator/qtools + export ANDROID_DEV_SCRIPTS=$TOP/development/scripts export ANDROID_BUILD_PATHS=:$(get_build_var ANDROID_BUILD_PATHS):$ANDROID_QTOOLS:$ANDROID_TOOLCHAIN:$ARM_EABI_TOOLCHAIN$CODE_REVIEWS:$ANDROID_DEV_SCRIPTS export PATH=$PATH$ANDROID_BUILD_PATHS @@ -169,17 +169,17 @@ # needed for processing samples collected by perf counters unset OPROFILE_EVENTS_DIR - export OPROFILE_EVENTS_DIR=$T/external/oprofile/events + export OPROFILE_EVENTS_DIR=$TOP/external/oprofile/events # needed for building linux on MacOS # TODO: fix the path - #export HOST_EXTRACFLAGS="-I "$T/system/kernel_headers/host_include + #export HOST_EXTRACFLAGS="-I "$TOP/system/kernel_headers/host_include } function printconfig() { - T=$(gettop) - if [ ! "$T" ]; then + TOP=$(gettop) + if [ ! "$TOP" ]; then echo "Couldn't locate the top of the tree. Try setting TOP." >&2 return fi @@ -566,14 +566,14 @@ # a command that prints something as a side-effect # (like pushd) local HERE=$PWD - T= + TOP= while [ \( ! \( -f $TOPFILE \) \) -a \( $PWD != "/" \) ]; do cd .. > /dev/null - T=`PWD= /bin/pwd` + TOP=`PWD= /bin/pwd` done cd $HERE > /dev/null - if [ -f "$T/$TOPFILE" ]; then - echo $T + if [ -f "$TOP/$TOPFILE" ]; then + echo $TOP fi fi fi @@ -581,9 +581,9 @@ function m() { - T=$(gettop) - if [ "$T" ]; then - make -C $T $@ + TOP=$(gettop) + if [ "$TOP" ]; then + make -C $TOP $@ else echo "Couldn't locate the top of the tree. Try setting TOP." fi @@ -596,11 +596,11 @@ # a command that prints something as a side-effect # (like pushd) local HERE=$PWD - T= + TOP= while [ \( ! \( -f $TOPFILE \) \) -a \( $PWD != "/" \) ]; do - T=$PWD - if [ -f "$T/Android.mk" ]; then - echo $T/Android.mk + TOP=$PWD + if [ -f "$TOP/Android.mk" ]; then + echo $TOP/Android.mk cd $HERE > /dev/null return fi @@ -617,24 +617,24 @@ make $@ else # Find the closest Android.mk file. - T=$(gettop) + TOP=$(gettop) local M=$(findmakefile) # Remove the path to top as the makefilepath needs to be relative - local M=`echo $M|sed 's:'$T'/::'` - if [ ! "$T" ]; then + local M=`echo $M|sed 's:'$TOP'/::'` + if [ ! "$TOP" ]; then echo "Couldn't locate the top of the tree. Try setting TOP." elif [ ! "$M" ]; then echo "Couldn't locate a makefile from the current directory." else - ONE_SHOT_MAKEFILE=$M make -C $T all_modules $@ + ONE_SHOT_MAKEFILE=$M make -C $TOP all_modules $@ fi fi } function mmm() { - T=$(gettop) - if [ "$T" ]; then + TOP=$(gettop) + if [ "$TOP" ]; then local MAKEFILE= local MODULES= local ARGS= @@ -648,7 +648,7 @@ fi DIR=`echo $DIR | sed -e 's/:.*//' -e 's:/$::'` if [ -f $DIR/Android.mk ]; then - TO_CHOP=`(cd -P -- $T && pwd -P) | wc -c | tr -d ' '` + TO_CHOP=`(cd -P -- $TOP && pwd -P) | wc -c | tr -d ' '` TO_CHOP=`expr $TO_CHOP + 1` START=`PWD= /bin/pwd` MFILE=`echo $START | cut -c${TO_CHOP}-` @@ -673,7 +673,7 @@ fi fi done - ONE_SHOT_MAKEFILE="$MAKEFILE" make -C $T $DASH_ARGS $MODULES $ARGS + ONE_SHOT_MAKEFILE="$MAKEFILE" make -C $TOP $DASH_ARGS $MODULES $ARGS else echo "Couldn't locate the top of the tree. Try setting TOP." fi @@ -681,8 +681,8 @@ function croot() { - T=$(gettop) - if [ "$T" ]; then + TOP=$(gettop) + if [ "$TOP" ]; then cd $(gettop) else echo "Couldn't locate the top of the tree. Try setting TOP." @@ -696,11 +696,11 @@ # a command that prints something as a side-effect # (like pushd) local HERE=$PWD - T= + TOP= while [ \( ! \( -f $TOPFILE \) \) -a \( $PWD != "/" \) ]; do - T=$PWD - if [ -f "$T/Android.mk" ]; then - cd $T + TOP=$PWD + if [ -f "$TOP/Android.mk" ]; then + cd $TOP return fi cd .. > /dev/null @@ -854,13 +854,13 @@ function tracedmdump() { - T=$(gettop) - if [ ! "$T" ]; then + TOP=$(gettop) + if [ ! "$TOP" ]; then echo "Couldn't locate the top of the tree. Try setting TOP." return fi local prebuiltdir=$(getprebuilt) - local KERNEL=$T/prebuilt/android-arm/kernel/vmlinux-qemu + local KERNEL=$TOP/prebuilt/android-arm/kernel/vmlinux-qemu local TRACE=$1 if [ ! "$TRACE" ] ; then @@ -1007,13 +1007,13 @@ echo "Couldn't locate output files. Try running 'lunch' first." >&2 return fi - T=$(gettop) - if [ ! "$T" ]; then + TOP=$(gettop) + if [ ! "$TOP" ]; then echo "Couldn't locate the top of the tree. Try setting TOP." >&2 return fi - (cd "$T" && mmm tests/SmokeTest) && + (cd "$TOP" && mmm tests/SmokeTest) && adb uninstall com.android.smoketest > /dev/null && adb uninstall com.android.smoketest.tests > /dev/null && adb install $ANDROID_PRODUCT_OUT/data/app/SmokeTestApp.apk && @@ -1024,12 +1024,12 @@ # simple shortcut to the runtest command function runtest() { - T=$(gettop) - if [ ! "$T" ]; then + TOP=$(gettop) + if [ ! "$TOP" ]; then echo "Couldn't locate the top of the tree. Try setting TOP." >&2 return fi - ("$T"/development/testrunner/runtest.py $@) + ("$TOP"/development/testrunner/runtest.py $@) } function godir () { @@ -1037,15 +1037,15 @@ echo "Usage: godir " return fi - T=$(gettop) - if [[ ! -f $T/filelist ]]; then + TOP=$(gettop) + if [[ ! -f $TOP/filelist ]]; then echo -n "Creating index..." - (cd $T; find . -wholename ./out -prune -o -wholename ./.repo -prune -o -type f > filelist) + (cd $TOP; find . -wholename ./out -prune -o -wholename ./.repo -prune -o -type f > filelist) echo " Done" echo "" fi local lines - lines=($(\grep "$1" $T/filelist | sed -e 's/\/[^/]*$//' | sort | uniq)) + lines=($(\grep "$1" $TOP/filelist | sed -e 's/\/[^/]*$//' | sort | uniq)) if [[ ${#lines[@]} = 0 ]]; then echo "Not found" return @@ -1073,7 +1073,7 @@ else pathname=${lines[0]} fi - cd $T/$pathname + cd $TOP/$pathname } # Force JAVA_HOME to point to java 1.6 if it isn't already set