Move ndk-common.sh to build/tools/

It doesn't make sense to put it under build/core/ anymore.

Change-Id: I3a63ecabd15d4c34c2ba3800b95246f5eeb6a6f3
diff --git a/build/tools/build-ndk-sysroot.sh b/build/tools/build-ndk-sysroot.sh
index bdfce14..13acda0 100755
--- a/build/tools/build-ndk-sysroot.sh
+++ b/build/tools/build-ndk-sysroot.sh
@@ -28,7 +28,7 @@
 # WARNING: For now, only a single target ABI/Architecture us supported
 #
 
-. `dirname $0`/../core/ndk-common.sh
+. `dirname $0`/ndk-common.sh
 
 # PLATFORM is the name of the current Android system platform
 PLATFORM=android-3
diff --git a/build/core/ndk-common.sh b/build/tools/ndk-common.sh
similarity index 99%
rename from build/core/ndk-common.sh
rename to build/tools/ndk-common.sh
index b1ed979..f8bef0e 100644
--- a/build/core/ndk-common.sh
+++ b/build/tools/ndk-common.sh
@@ -66,7 +66,7 @@
     exit 1
 fi
 
-if [ ! -f $ANDROID_NDK_ROOT/build/core/ndk-common.sh ] ; then
+if [ ! -f $ANDROID_NDK_ROOT/build/tools/ndk-common.sh ] ; then
     echo "ERROR: Your ANDROID_NDK_ROOT variable does not point to a valid directory."
     exit 1
 fi
diff --git a/build/tools/prebuilt-common.sh b/build/tools/prebuilt-common.sh
index 97b451a..79c1b34 100644
--- a/build/tools/prebuilt-common.sh
+++ b/build/tools/prebuilt-common.sh
@@ -24,7 +24,7 @@
 
 NDK_BUILDTOOLS_ABSPATH=$(cd $NDK_BUILDTOOLS_PATH && pwd)
 
-. $NDK_BUILDTOOLS_PATH/../core/ndk-common.sh
+. $NDK_BUILDTOOLS_PATH/ndk-common.sh
 . $NDK_BUILDTOOLS_PATH/dev-defaults.sh
 
 #====================================================
diff --git a/ndk-gdb b/ndk-gdb
index 972f3ad..2faa7df 100755
--- a/ndk-gdb
+++ b/ndk-gdb
@@ -35,7 +35,7 @@
         ;;
 esac
 
-. $PROGDIR/build/core/ndk-common.sh
+. $PROGDIR/build/tools/ndk-common.sh
 
 force_32bit_binaries
 
diff --git a/ndk-gdb-py b/ndk-gdb-py
index f2a4d94..11643d4 100755
--- a/ndk-gdb-py
+++ b/ndk-gdb-py
@@ -11,7 +11,7 @@
         ;;
 esac
 
-. $PROGDIR/build/core/ndk-common.sh
+. $PROGDIR/build/tools/ndk-common.sh
 
 # -u means unbuffered standard io.
 $PROGDIR/prebuilt/$HOST_TAG/bin/python -u $PROGDIR/ndk-gdb.py "$@"
diff --git a/tests/check-release.sh b/tests/check-release.sh
index cdf6f68..32d0dc6 100755
--- a/tests/check-release.sh
+++ b/tests/check-release.sh
@@ -20,7 +20,7 @@
 PROGNAME=$(basename "$0")
 PROGDIR=$(dirname "$0")
 
-. "$PROGDIR"/../build/core/ndk-common.sh
+. "$PROGDIR"/../build/tools/ndk-common.sh
 
 panic () {
     echo "ERROR: $@" >&2
diff --git a/tests/run-tests-all.sh b/tests/run-tests-all.sh
index e2fcbed..ed78365 100755
--- a/tests/run-tests-all.sh
+++ b/tests/run-tests-all.sh
@@ -3,8 +3,8 @@
 PROGDIR=`dirname $0`
 NDK=`cd $PROGDIR/.. && pwd`
 NDK_BUILDTOOLS_PATH=$NDK/build/tools
-. $NDK/build/core/ndk-common.sh
-. $NDK/build/tools/prebuilt-common.sh
+. $NDK_BUILDTOOLS_PATH/ndk-common.sh
+. $NDK_BUILDTOOLS_PATH/prebuilt-common.sh
 
 # Find all devices
 DEVICE_arm=
diff --git a/tests/run-tests.sh b/tests/run-tests.sh
index 6620607..0003fef 100755
--- a/tests/run-tests.sh
+++ b/tests/run-tests.sh
@@ -29,8 +29,8 @@
 #
 ROOTDIR=`cd $PROGDIR/.. && pwd`
 NDK_BUILDTOOLS_PATH=$ROOTDIR/build/tools
-. $ROOTDIR/build/core/ndk-common.sh
-. $ROOTDIR/build/tools/prebuilt-common.sh
+. $NDK_BUILDTOOLS_PATH/ndk-common.sh
+. $NDK_BUILDTOOLS_PATH/prebuilt-common.sh
 
 # The list of tests that are too long to be part of a normal run of
 # run-tests.sh. Most of these do not run properly at the moment.
@@ -281,7 +281,7 @@
         dump "Please use a valid path for this option."
         exit 1
     fi
-    if [ ! -f "$NDK_ROOT/ndk-build" -o ! -f "$NDK_ROOT/build/core/ndk-common.sh" ] ; then
+    if [ ! -f "$NDK_ROOT/ndk-build" -o ! -f "$NDK_ROOT/build/tools/prebuilt-common.sh" ] ; then
         dump "ERROR: Your --ndk option does not point to a valid NDK install: $NDK_ROOT"
         dump "Please use a valid NDK install path for this option."
         exit 3
diff --git a/tests/standalone/run.sh b/tests/standalone/run.sh
index 73e22f5..45b4867 100755
--- a/tests/standalone/run.sh
+++ b/tests/standalone/run.sh
@@ -31,7 +31,7 @@
 PROGNAME=$(basename "$0")
 PROGDIR=$(dirname "$0")
 NDK_ROOT=$(cd "$PROGDIR/../.." && pwd)
-. $NDK_ROOT/build/core/ndk-common.sh
+. $NDK_ROOT/build/tools/ndk-common.sh
 
 panic () {
     echo "ERROR: $@" >&2; exit 1