aboutsummaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2017-09-14 11:27:03 -0700
committerDan Albert <danalbert@google.com>2017-09-14 11:43:56 -0700
commit020ebcfa8365a492f6586d29ea08c746688f4122 (patch)
tree8ab29d04e6d195da29fd3a63efdd6b9795eea2ac /sources
parentf41200c3c2cd1d67349c700bb0518a3260bb7f98 (diff)
downloadndk-020ebcfa8365a492f6586d29ea08c746688f4122.tar.gz
Don't use TMPDIR when building ndk-stack.
Test: TMPDIR=foo ./checkbuild.py --module host-tools Bug: None Change-Id: I20e93e2ded3807884d13219306f59ff6cb265cca
Diffstat (limited to 'sources')
-rwxr-xr-xsources/host-tools/ndk-stack/build-ndk-stack.sh18
-rwxr-xr-xsources/host-tools/ndk-stack/build.py2
2 files changed, 3 insertions, 17 deletions
diff --git a/sources/host-tools/ndk-stack/build-ndk-stack.sh b/sources/host-tools/ndk-stack/build-ndk-stack.sh
index 9758bc933..4d2a110e3 100755
--- a/sources/host-tools/ndk-stack/build-ndk-stack.sh
+++ b/sources/host-tools/ndk-stack/build-ndk-stack.sh
@@ -28,7 +28,6 @@ PROGRAM_DESCRIPTION=\
register_jobs_option
-OPTION_BUILD_DIR=
BUILD_DIR=
register_var_option "--build-dir=<path>" BUILD_DIR "Specify build directory"
@@ -60,14 +59,6 @@ fi
prepare_abi_configure_build
prepare_host_build
-# Choose a build directory if not specified by --build-dir
-if [ -z "$BUILD_DIR" ]; then
- BUILD_DIR=$NDK_TMPDIR/build-ndk-stack
- log "Auto-config: --build-dir=$BUILD_DIR"
-else
- OPTION_BUILD_DIR="yes"
-fi
-
rm -rf $BUILD_DIR
mkdir -p $BUILD_DIR
@@ -110,7 +101,7 @@ run make -j$NUM_JOBS
fail_panic "Can't build $BINUTILS_SRC_DIR"
NAME=$(get_host_exec_name ndk-stack)
-INSTALL_ROOT=$(mktemp -d $NDK_TMPDIR/ndk-stack-XXXXXX)
+INSTALL_ROOT=$BUILD_DIR/install
INSTALL_SUBDIR=host-tools/bin
INSTALL_PATH=$INSTALL_ROOT/$INSTALL_SUBDIR
OUT=$INSTALL_PATH/$NAME
@@ -178,12 +169,5 @@ if [ "$PACKAGE_DIR" ]; then
fail_panic "Could not create package: $PACKAGE_DIR/$ARCHIVE from $OUT"
fi
-if [ "$OPTION_BUILD_DIR" != "yes" ]; then
- log "Cleaning up..."
- rm -rf $BUILD_DIR
-else
- log "Don't forget to cleanup: $BUILD_DIR"
-fi
-
log "Done!"
exit 0
diff --git a/sources/host-tools/ndk-stack/build.py b/sources/host-tools/ndk-stack/build.py
index a930ff437..14ee57e33 100755
--- a/sources/host-tools/ndk-stack/build.py
+++ b/sources/host-tools/ndk-stack/build.py
@@ -38,6 +38,8 @@ def main(args):
if args.host != 'windows':
build_cmd.append('--try-64')
+ build_cmd.append('--build-dir=' + os.path.join(args.out_dir, 'ndk-stack'))
+
build_support.build(build_cmd, args, intermediate_package=True)
if __name__ == '__main__':