Use TMPDIR, not /tmp.
-----------------------------------------------------------------------------
--- $Id: DriverPipeline.hs,v 1.52 2001/02/27 12:36:37 rrt Exp $
+-- $Id: DriverPipeline.hs,v 1.53 2001/03/06 15:00:25 rrt Exp $
--
-- GHC Driver
--
-- genPipeline
--
-- Herein is all the magic about which phases to run in which order, whether
--- the intermediate files should be in /tmp or in the current directory,
+-- the intermediate files should be in TMPDIR or in the current directory,
-- what the suffix of the intermediate files should be, etc.
-- The following compilation pipeline algorithm is fairly hacky. A
-----------------------------------------------------------------------------
--- $Id: DriverUtil.hs,v 1.16 2000/12/20 15:44:01 rrt Exp $
+-- $Id: DriverUtil.hs,v 1.17 2001/03/06 15:00:25 rrt Exp $
--
-- Utils for the driver
--
(\_ -> throwDyn (PhaseFailed phase_name (ExitFailure 1)))
#else
pid <- myGetProcessID
- let tmp = "/tmp/sh" ++ show pid
+ tmp_dir <- readIORef v_TmpDir
+ let tmp = tmp_dir++"/sh"++show pid
h <- openFile tmp WriteMode
hPutStrLn h cmd
hClose h
| HscRecomp PersistentCompilerState -- updated PCS
ModDetails -- new details (HomeSymbolTable additions)
ModIface -- new iface (if any compilation was done)
- (Maybe String) -- generated stub_h filename (in /tmp)
- (Maybe String) -- generated stub_c filename (in /tmp)
+ (Maybe String) -- generated stub_h filename (in TMPDIR)
+ (Maybe String) -- generated stub_c filename (in TMPDIR)
(Maybe ([UnlinkedBCO],ItblEnv)) -- interpreted code, if any