summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-07-13 21:50:25 +0000
committerThomas Martitz <kugel@rockbox.org>2009-07-13 21:50:25 +0000
commit0e2a93369ed1f112118682e9d5ff98db29395ebe (patch)
treed00904f1a0beed58a50ff8d254ac25d7ee4b23e4 /tools
parenteea149bd1399e749a6dae8b3a6fe5ff076ead985 (diff)
downloadrockbox-0e2a93369ed1f112118682e9d5ff98db29395ebe.zip
rockbox-0e2a93369ed1f112118682e9d5ff98db29395ebe.tar.gz
rockbox-0e2a93369ed1f112118682e9d5ff98db29395ebe.tar.bz2
rockbox-0e2a93369ed1f112118682e9d5ff98db29395ebe.tar.xz
Try to make configure respect the TMPDIR environment variable.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21849 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rwxr-xr-xtools/configure18
1 files changed, 13 insertions, 5 deletions
diff --git a/tools/configure b/tools/configure
index 6d65f64..c6341ff 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 <<EOF
+ cat >$tmpdir/conftest-$id.c <<EOF
#include <stdio.h>
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"