X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fmain%2FDriverPipeline.hs;h=289285ddd549cd6cbf60a1907df287162219ccbf;hb=5d090a3148fd99c318b1e4b33c5f3c705e0a58c6;hp=af517ca6ca4dbc69ea4d9f8a1b2f904399b45509;hpb=cfff5d21bcd78cc4e8f4b5fcb6f7fddcc5f19b99;p=ghc-hetmet.git diff --git a/ghc/compiler/main/DriverPipeline.hs b/ghc/compiler/main/DriverPipeline.hs index af517ca..289285d 100644 --- a/ghc/compiler/main/DriverPipeline.hs +++ b/ghc/compiler/main/DriverPipeline.hs @@ -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