From 0e2a93369ed1f112118682e9d5ff98db29395ebe Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Mon, 13 Jul 2009 21:50:25 +0000 Subject: [PATCH] Try to make configure respect the TMPDIR environment variable. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21849 a1c6a512-1295-4272-9138-f99709370657 --- tools/configure | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/tools/configure b/tools/configure index 6d65f648cf..c6341ff790 100755 --- a/tools/configure +++ b/tools/configure @@ -16,7 +16,7 @@ use_logf="#undef ROCKBOX_HAS_LOGF" scriptver=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'` rbdir=".rockbox" - + # # Begin Function Definitions # @@ -186,7 +186,7 @@ simcc () { fi id=$$ - cat >/tmp/conftest-$id.c <$tmpdir/conftest-$id.c < int main(int argc, char **argv) { @@ -199,9 +199,9 @@ int main(int argc, char **argv) } EOF - $CC -o /tmp/conftest-$id /tmp/conftest-$id.c 2>/dev/null + $CC -o $tmpdir/conftest-$id $tmpdir/conftest-$id.c 2>/dev/null - if test `/tmp/conftest-$id 2>/dev/null` -gt "1"; then + if test `$tmpdir/conftest-$id 2>/dev/null` -gt "1"; then # big endian endian="big" else @@ -212,7 +212,7 @@ EOF # use wildcard here to make it work even if it was named *.exe like # on cygwin - rm -f /tmp/conftest-$id* + rm -f $tmpdir/conftest-$id* fi } @@ -678,6 +678,14 @@ whichlang() { opt=$1 + +if [ "$TMPDIR" != "" ]; then + tmpdir=$TMPDIR +else + tmpdir=/tmp +fi + +echo $tmpdir if test "$opt" = "--help"; then echo "Rockbox configure script." echo "Invoke this in a directory to generate a Makefile to build Rockbox"