[project @ 2004-08-13 13:04:50 by simonmar]
[ghc-hetmet.git] / ghc / compiler / main / DriverState.hs
index cad7f2b..a34d4a1 100644 (file)
@@ -1,5 +1,4 @@
 -----------------------------------------------------------------------------
--- $Id: DriverState.hs,v 1.100 2004/02/25 11:31:24 simonmar Exp $
 --
 -- Settings for the driver
 --
@@ -9,7 +8,7 @@
 
 module DriverState where
 
-#include "../includes/config.h"
+#include "../includes/ghcconfig.h"
 #include "HsVersions.h"
 
 import ParsePkgConf    ( loadPackageConfig )
@@ -65,19 +64,19 @@ setMode m flag = do
 
 isCompManagerMode DoMake        = True
 isCompManagerMode DoInteractive = True
+isCompManagerMode (DoEval _)    = True
 isCompManagerMode _             = False
 
 -----------------------------------------------------------------------------
 -- Global compilation flags
 
--- Cpp-related flags
-v_Hs_source_cpp_opts = global
+-- Default CPP defines in Haskell source
+hsSourceCppOpts =
        [ "-D__HASKELL1__="++cHaskell1Version
        , "-D__GLASGOW_HASKELL__="++cProjectVersionInt                          
        , "-D__HASKELL98__"
        , "-D__CONCURRENT_HASKELL__"
        ]
-{-# NOINLINE v_Hs_source_cpp_opts #-}
 
 
 -- Keep output from intermediate phases
@@ -211,6 +210,10 @@ GLOBAL_VAR(v_Framework_paths, [], [String])
 GLOBAL_VAR(v_Cmdline_frameworks, [], [String])
 #endif
 
+addToOrDeleteDirList :: IORef [String] -> String -> IO ()
+addToOrDeleteDirList ref ""   = writeIORef ref []
+addToOrDeleteDirList ref path = addToDirList ref path
+
 addToDirList :: IORef [String] -> String -> IO ()
 addToDirList ref path
   = do paths           <- readIORef ref
@@ -573,7 +576,7 @@ way_details :: [ (WayName, Way) ]
 way_details =
   [ (WayThreaded, Way "thr" True "Threaded" [
 #if defined(freebsd_TARGET_OS)
-       , "-optc-pthread"
+       "-optc-pthread"
 #endif
        ] ),