From: simonmar Date: Fri, 13 Jul 2001 14:59:32 +0000 (+0000) Subject: [project @ 2001-07-13 14:59:32 by simonmar] X-Git-Tag: Approximately_9120_patches~1557 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=d0bbc139bb5719596409b468b7e15f2bd7880d3b;p=ghc-hetmet.git [project @ 2001-07-13 14:59:32 by simonmar] check TMPDIR (got lost somewhere in the conversion to SysTools) --- diff --git a/ghc/compiler/main/SysTools.lhs b/ghc/compiler/main/SysTools.lhs index 71e0e8e..1887038 100644 --- a/ghc/compiler/main/SysTools.lhs +++ b/ghc/compiler/main/SysTools.lhs @@ -53,7 +53,7 @@ import IO import Directory ( doesFileExist, removeFile ) import IOExts ( IORef, readIORef, writeIORef ) import Monad ( when, unless ) -import System ( system, ExitCode(..), exitWith ) +import System ( system, ExitCode(..), exitWith, getEnv ) #include "../includes/config.h" @@ -214,6 +214,14 @@ initSysTools minusB_args | am_installed = installed_bin cGHC_MANGLER | otherwise = inplace cGHC_MANGLER_DIR cGHC_MANGLER +#ifndef mingw32_TARGET_OS + -- check whether TMPDIR is set in the environment + ; IO.try (do dir <- getEnv "TMPDIR" -- fails if not set + setTmpDir dir + return () + ) +#endif + -- Check that the package config exists ; config_exists <- doesFileExist pkgconfig_path ; when (not config_exists) $