changeset 31526:ec8cb01e57d1

Place temporary files in a subdirectory of their own.
author diego
date Thu, 01 Jul 2010 09:00:54 +0000
parents dd2b64511f05
children 0ac68f6f3974
files configure
diffstat 1 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Wed Jun 30 10:09:19 2010 +0000
+++ b/configure	Thu Jul 01 09:00:54 2010 +0000
@@ -1533,13 +1533,15 @@
   test "$I" && break
 done
 
-
-TMPLOG="config.log"
-TMPC="$I/mplayer-conf-$RANDOM-$$.c"
-TMPCPP="$I/mplayer-conf-$RANDOM-$$.cpp"
-TMPEXE="$I/mplayer-conf-$RANDOM-$$$_exesuf"
-TMPH="$I/mplayer-conf-$RANDOM-$$.h"
-TMPS="$I/mplayer-conf-$RANDOM-$$.S"
+mplayer_tmpdir="$tmpdir/mplayer-configure-$RANDOM-$$"
+mkdir $mplayer_tmpdir || die "Unable to create tmpdir."
+
+TMPLOG="$mplayer_tmpdir/config.log"
+TMPC="$mplayer_tmpdir/tmp.c"
+TMPCPP="$mplayer_tmpdir/tmp.cpp"
+TMPEXE="$mplayer_tmpdir/tmp$_exesuf"
+TMPH="$mplayer_tmpdir/tmp.h"
+TMPS="$mplayer_tmpdir/tmp.S"
 
 rm -f "$TMPLOG"
 echo configuration: $configuration > "$TMPLOG"
@@ -9381,4 +9383,4 @@
 fi
 
 # Last move:
-rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP" "$TMPH"
+rm -rf "$mplayer_tmpdir"