[m-dev.] diff: change scripts/*.in to honour TMPDIR
Fergus Henderson
fjh at cs.mu.OZ.AU
Mon Sep 13 16:33:07 AEST 1999
On 10-Sep-1999, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> scripts/ml.in:
> scripts/mmake.in:
> Honour the TMPDIR environment, if it is set,
> rather than always using /tmp.
I also changed configure.in likewise.
Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.178
diff -u -u -r1.178 configure.in
--- configure.in 1999/08/24 01:32:25 1.178
+++ configure.in 1999/09/10 09:01:00
@@ -21,6 +21,7 @@
[echo $1 1>&AC_FD_MSG])
#-----------------------------------------------------------------------------#
AC_INIT(runtime/mercury_wrapper.c)
+TMPDIR=${TMPDIR=/tmp}
#-----------------------------------------------------------------------------#
#
# Ensure that all messages are saved to a file `configure.log' by
@@ -126,7 +127,7 @@
AC_PATH_PROG(MKFIFO,mkfifo)
if test "$MKFIFO" != ""; then
# check that it really works
- tmp=/tmp/fifo$$
+ tmp=$TMPDIR/fifo$$
trap "rm -f $tmp" 1 2 3 13 15
if $MKFIFO $tmp && test -p $tmp; then
true
@@ -139,7 +140,7 @@
AC_PATH_PROG(MKNOD,mknod)
if test "$MKNOD" != ""; then
# check that it really works
- tmp=/tmp/fifo$$
+ tmp=$TMPDIR/fifo$$
trap "rm -f $tmp" 1 2 3 13 15
if $MKNOD $tmp p && test -p $tmp; then
MKFIFO=mkfifo_using_mknod
@@ -163,9 +164,9 @@
AC_PATH_PROG(MKTEMP,mktemp)
if test "$MKTEMP" != ""; then
# check that it really works
- TMPFILE="`mktemp /tmp/configure.XXXXXX < /dev/null`"
+ TMPFILE="`mktemp $TMPDIR/configure.XXXXXX < /dev/null`"
case "$TMPFILE" in
- /tmp/configure.*) rm -f $TMPFILE ;;
+ $TMPDIR/configure.*) rm -f $TMPFILE ;;
*) MKTEMP="" ;;
esac
fi
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list