[project @ 2001-03-06 15:00:25 by rrt]
authorrrt <unknown>
Tue, 6 Mar 2001 15:00:25 +0000 (15:00 +0000)
committerrrt <unknown>
Tue, 6 Mar 2001 15:00:25 +0000 (15:00 +0000)
Use TMPDIR, not /tmp.

ghc/compiler/main/DriverPipeline.hs
ghc/compiler/main/DriverUtil.hs
ghc/compiler/main/HscMain.lhs

index 079ff72..f568672 100644 (file)
@@ -1,5 +1,5 @@
 -----------------------------------------------------------------------------
--- $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
 --
@@ -101,7 +101,7 @@ getGhcMode flags
 -- 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
index 91fd3ca..e6f7cff 100644 (file)
@@ -1,5 +1,5 @@
 -----------------------------------------------------------------------------
--- $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
 --
@@ -171,7 +171,8 @@ kludgedSystem cmd phase_name
                   (\_ -> 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
index 4bbf855..ab8730c 100644 (file)
@@ -97,8 +97,8 @@ data HscResult
    | 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