Fix get_abs_build_var to work from below $ANDROID_BUILD_TOP
I tried running gdbclient from a subdirectory of $ANDROID_BUILD_TOP
and found that the absolute paths generated by get_abs_build_var
included my subdirectory's path. This fixed get_abs_build_var to
changing directory in a subshell to $ANDROID_BUILD_TOP before invoking
make.
Change-Id: I12b9d9135ac7c044c21c88ed5705b22b0700c039
diff --git a/envsetup.sh b/envsetup.sh
index 85465b1..8798344 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -29,8 +29,8 @@
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-abs-$1
+ (cd $T; CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core \
+ make --no-print-directory -C "$T" -f build/core/config.mk dumpvar-abs-$1)
}
# Get the exact value of a build variable.