Home | History | Annotate | Download | only in scripts
      1 #!/bin/bash -ex
      2 
      3 if [ -z "${OUT_DIR}" ]; then
      4     echo Must set OUT_DIR
      5     exit 1
      6 fi
      7 
      8 TOP=$(pwd)
      9 
     10 source build/envsetup.sh
     11 PLATFORM_SDK_VERSION=$(get_build_var PLATFORM_SDK_VERSION)
     12 
     13 SOONG_OUT=${OUT_DIR}/soong
     14 SOONG_NDK_OUT=${OUT_DIR}/soong/ndk
     15 rm -rf ${SOONG_OUT}
     16 mkdir -p ${SOONG_OUT}
     17 cat > ${SOONG_OUT}/soong.config << EOF
     18 {
     19     "Ndk_abis": true,
     20     "Platform_sdk_version": ${PLATFORM_SDK_VERSION}
     21 }
     22 EOF
     23 BUILDDIR=${SOONG_OUT} ./bootstrap.bash
     24 ${SOONG_OUT}/soong ${SOONG_OUT}/ndk.timestamp
     25 
     26 if [ -n "${DIST_DIR}" ]; then
     27     mkdir -p ${DIST_DIR} || true
     28     tar cjf ${DIST_DIR}/ndk_platform.tar.bz2 -C ${SOONG_OUT} ndk
     29 fi
     30