[project @ 2001-07-03 16:46:21 by rrt]
[ghc-hetmet.git] / ghc / compiler / main / DriverPipeline.hs
index af517ca..289285d 100644 (file)
@@ -1,5 +1,5 @@
 -----------------------------------------------------------------------------
--- $Id: DriverPipeline.hs,v 1.82 2001/06/26 16:30:50 rrt Exp $
+-- $Id: DriverPipeline.hs,v 1.86 2001/07/03 16:46:21 rrt Exp $
 --
 -- GHC Driver
 --
@@ -63,17 +63,6 @@ import MatchPS
 -----------------------------------------------------------------------------
 -- GHC modes of operation
 
-data GhcMode
-  = DoMkDependHS                       -- ghc -M
-  | DoMkDLL                            -- ghc --mk-dll
-  | StopBefore Phase                   -- ghc -E | -C | -S | -c
-  | DoMake                             -- ghc --make
-  | DoInteractive                      -- ghc --interactive
-  | DoLink                             -- [ the default ]
-  deriving (Eq)
-
-GLOBAL_VAR(v_GhcMode, error "todo", GhcMode)
-
 modeFlag :: String -> Maybe GhcMode
 modeFlag "-M"           = Just $ DoMkDependHS
 modeFlag "--mk-dll"      = Just $ DoMkDLL
@@ -344,15 +333,14 @@ run_phase Cpp basename suff input_fn output_fn
 
        -- ToDo: switch away from using 'echo' altogether (but need
        -- a faster alternative than what's done below).
-#if defined(mingw32_TARGET_OS) && defined(MINIMAL_UNIX_DEPS)
-         else (do
+#if defined(mingw32_TARGET_OS)
+         else do
            h <- openFile output_fn WriteMode
            hPutStrLn h ("{-# LINE 1 \"" ++ input_fn ++ "\" #-}")
            ls <- readFile input_fn -- inefficient, but it'll do for now.
                                    -- ToDo: speed up via slurping.
            hPutStrLn h ls
-           hClose h) `catchAllIO`
-                       (\_ -> throwDyn (PhaseFailed "Ineffective C pre-processor" (ExitFailure 1)))
+           hClose h
 #else
          else do
            SysTools.runSomething "Ineffective C pre-processor"
@@ -385,6 +373,7 @@ run_phase MkDependHS basename suff input_fn _output_fn = do
           
    objs <- mapM odir_ify ofiles
    
+       -- Handle for file that accumulates dependencies 
    hdl <- readIORef v_Dep_tmp_hdl
 
        -- std dependency of the object(s) on the source file