summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2017-09-14 11:34:24 -0700
committerDan Albert <danalbert@google.com>2017-09-14 12:51:27 -0700
commit3523c96c33b926e54090024a23f9247563181c6d (patch)
tree5dfb2a4e1ec1b4eb06cac732660ededd96f95e73
parentbc2744c3818fe9142bb5b90af08004584a75c8d7 (diff)
downloadgdb-3523c96c33b926e54090024a23f9247563181c6d.tar.gz
Fix more TMPDIR issues in build-gdb.sh.
Test: TMPDIR=foo ndk/checkbuild.py --module host-tools Bug: None Change-Id: I214561f6fec21cfb8d6d8522421e1d8deae00a00
-rwxr-xr-xbuild-gdb.sh17
1 files changed, 7 insertions, 10 deletions
diff --git a/build-gdb.sh b/build-gdb.sh
index e43d7294a..9ced04671 100755
--- a/build-gdb.sh
+++ b/build-gdb.sh
@@ -102,6 +102,9 @@ if [ -z "$PYTHON_BUILD_DIR" ] ; then
panic "--python-build-dir is required"
fi
+INSTALL_DIR=$BUILD_DIR/install
+BUILD_DIR=$BUILD_DIR/build
+
bh_setup_build_dir $BUILD_DIR
# Sanity check that we have the right compilers for all hosts
@@ -279,13 +282,7 @@ build_host_gdb ()
run "$SRCDIR"/configure $ARGS &&
run make -j$NUM_JOBS &&
run make -j$NUM_JOBS install
-
- if [ $? -ne 0 ]; then
- mkdir -p $PACKAGE_DIR/config_logs
- find $TMPDIR -name 'config.log' | cpio -pdm $PACKAGE_DIR/config_logs
- cp $(python_build_install_dir $1)/bin/python-config.sh $PACKAGE_DIR/config_logs
- panic "Failed to configure/make/install gdb"
- fi
+ fail_panic "Failed to configure/make/install gdb"
}
# Install host GDB binaries and support files to the NDK install dir.
@@ -295,8 +292,8 @@ build_host_gdb ()
install_host_gdb ()
{
local SRCDIR="$(gdb_build_install_dir $1 $2)"
- local DSTDIR="$TMPDIR/$(gdb_ndk_install_dir $1)"
- local PYDIR="$TMPDIR/$(python_ndk_install_dir $1)"
+ local DSTDIR="$INSTALL_DIR/$(gdb_ndk_install_dir $1)"
+ local PYDIR="$INSTALL_DIR/$(python_ndk_install_dir $1)"
build_host_gdb $@
@@ -351,7 +348,7 @@ package_host_gdb ()
local PACKAGE="$PACKAGE_DIR/$PACKAGENAME"
dump "$(bh_host_text) $PACKAGENAME: Packaging"
- run pack_archive "$PACKAGE" "$TMPDIR" "$SRCDIR"
+ run pack_archive "$PACKAGE" "$INSTALL_DIR" "$SRCDIR"
fail_panic "Failed to package GDB!"
}