Fix warnings in runghc
[ghc-hetmet.git] / compiler / ghc.cabal
index 37abf10..88b04d1 100644 (file)
@@ -26,17 +26,17 @@ Flag editline
 Flag ghci
     Description: Build GHCi support.
 
+Flag ncg
+    Description: Build the NCG.
+
 Flag stage1
     Description: Is this stage 1?
 
-Flag windows
-    Description: On a Windows machine
-
 Library
     Exposed: False
 
     if flag(base3)
-        Build-Depends: base       >= 3   && < 4,
+        Build-Depends: base       >= 3   && < 5,
                        directory  >= 1   && < 1.1,
                        process    >= 1   && < 1.1,
                        bytestring >= 0.9 && < 0.10,
@@ -47,7 +47,7 @@ Library
         Build-Depends: base < 3
     Build-Depends: filepath >= 1 && < 1.2
     Build-Depends: haskell98, Cabal, hpc
-    if flag(windows)
+    if os(windows)
         Build-Depends: Win32
     else
         Build-Depends: unix
@@ -63,6 +63,9 @@ Library
         CPP-Options: -DGHCI
         Include-Dirs: ../libffi/build/include
 
+    if !flag(ncg)
+        CPP-Options: -DOMIT_NATIVE_CODEGEN
+
     -- GHC 6.4.2 needs to be able to find WCsubst.c, which needs to be
     -- able to find WCsubst.h
     Include-Dirs: ../libraries/base/cbits, ../libraries/base/include
@@ -101,7 +104,6 @@ Library
         hsSyn
         iface
         main
-        nativeGen
         parser
         prelude
         profiling
@@ -120,6 +122,7 @@ Library
         BasicTypes
         DataCon
         Demand
+        Exception
         Id
         IdInfo
         Literal
@@ -209,6 +212,7 @@ Library
         CoreUnfold
         CoreUtils
         ExternalCore
+        MkCore
         MkExternalCore
         PprCore
         PprExternalCore
@@ -270,24 +274,6 @@ Library
         StaticFlags
         SysTools
         TidyPgm
-        AsmCodeGen
-        MachCodeGen
-        MachInstrs
-        MachRegs
-        NCGMonad
-        PositionIndependentCode
-        PprMach
-        RegAllocColor
-        RegAllocInfo
-        RegAllocLinear
-        RegAllocStats
-        RegArchBase
-        RegArchX86
-        RegCoalesce
-        RegLiveness
-        RegSpill
-        RegSpillClean
-        RegSpillCost
         Ctype
         HaddockLex
         HaddockParse
@@ -419,6 +405,30 @@ Library
         VectUtils
         Vectorise
 
+    if flag(ncg)
+        hs-source-dirs:
+            nativeGen
+
+        Exposed-Modules:
+            AsmCodeGen
+            MachCodeGen
+            MachInstrs
+            MachRegs
+            NCGMonad
+            PositionIndependentCode
+            PprMach
+            RegAllocColor
+            RegAllocInfo
+            RegAllocLinear
+            RegAllocStats
+            RegArchBase
+            RegArchX86
+            RegCoalesce
+            RegLiveness
+            RegSpill
+            RegSpillClean
+            RegSpillCost
+
     if flag(ghci)
         Exposed-Modules:
             DsMeta