diff --git a/distribute.sh b/distribute.sh index f7bdf4dfc4..32bb664642 100755 --- a/distribute.sh +++ b/distribute.sh @@ -99,7 +99,7 @@ function push_arm() { # this must be something depending of the API level of Android export PATH="$ANDROIDNDK/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/bin/:$ANDROIDNDK:$ANDROIDSDK/tools:$PATH" - if [ "X$ANDROIDNDKVER" == "Xr7" ]; then + if [ "X${ANDROIDNDKVER:0:2}" == "Xr7" ]; then export TOOLCHAIN_PREFIX=arm-linux-androideabi export TOOLCHAIN_VERSION=4.4.3 elif [ "X$ANDROIDNDKVER" == "Xr5b" ]; then diff --git a/src/build.py b/src/build.py index af8ae33396..7b93a7d99a 100755 --- a/src/build.py +++ b/src/build.py @@ -242,8 +242,9 @@ def make_package(args): args=args) # Update the project to a recent version. + android_api = 'android-%s' % os.environ.get('ANDROIDAPI', '8') try: - subprocess.call([ANDROID, 'update', 'project', '-p', '.', '-t', 'android-8']) + subprocess.call([ANDROID, 'update', 'project', '-p', '.', '-t', android_api]) except (OSError, IOError): print 'An error occured while calling', ANDROID, 'update' print 'Your PATH must include android tools.'