aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2012-01-05 12:54:53 -0800
committerJean-Baptiste Queru <jbq@google.com>2012-01-05 12:57:03 -0800
commit4bcc1d92f4d49ee7331bd2eacd28d497e505c5c7 (patch)
tree64a906c484cb0f17d3e2afd0ec93e6ec07576b02
parent49dd3f3b705e9a78984699d52ddf9ed9561c9dc2 (diff)
downloadexternal_qemu-4bcc1d92f4d49ee7331bd2eacd28d497e505c5c7.zip
external_qemu-4bcc1d92f4d49ee7331bd2eacd28d497e505c5c7.tar.gz
external_qemu-4bcc1d92f4d49ee7331bd2eacd28d497e505c5c7.tar.bz2
Explicitly use the top of the source tree to find the kernel.
This way, we don't rely on the relative position of the source directory and the out directory, and the emulator works when using OUT_DIR_COMMON_BASE Change-Id: I319f4fffc9ffee676d8040ebbb017831db08f6b6
-rw-r--r--android/main-common.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/android/main-common.c b/android/main-common.c
index a662907..04d200a 100644
--- a/android/main-common.c
+++ b/android/main-common.c
@@ -806,12 +806,15 @@ AvdInfo* createAVD(AndroidOptions* opts, int* inAndroidBuild)
exit(2);
}
- android_build_root = path_parent( out, 4 );
- if (android_build_root == NULL || !path_exists(android_build_root)) {
- derror("Can't find the Android build root from '%s'\n"
- "Please check the definition of the ANDROID_PRODUCT_OUT variable.\n"
- "It should point to your product-specific build output directory.\n",
- out );
+ android_build_root = getenv("ANDROID_BUILD_TOP");
+ if (android_build_root == NULL || android_build_root[0] == 0)
+ break;
+
+ if (!path_exists(android_build_root)) {
+ derror("Can't find the Android build root '%s'\n"
+ "Please check the definition of the ANDROID_BUILD_TOP variable.\n"
+ "It should point to the root of your source tree.\n",
+ android_build_root );
exit(2);
}
android_build_out = out;