Separate the static flag parser from the static global variables
[ghc-hetmet.git] / compiler / ghc.cabal
1 Name: ghc
2 -- XXX Version number!
3 Version: 6.9
4 Copyright: XXX
5 -- License: XXX
6 License-File: XXX
7 Author: XXX
8 Maintainer: glasgow-haskell-users@haskell.org
9 Homepage: http://www.haskell.org/ghc/
10 Synopsis: XXX
11 Description:
12         XXX
13 Category: XXX
14 Build-Type: Simple
15 Cabal-Version: >= 1.2
16
17 Flag base4
18     Description: Choose the even newer, even smaller, split-up base package.
19
20 Flag base3
21     Description: Choose the new smaller, split-up base package.
22
23 Flag dynlibs
24     Description: Dynamic library support
25
26 Flag editline
27     Description: Use editline
28
29 Flag ghci
30     Description: Build GHCi support.
31
32 Flag ncg
33     Description: Build the NCG.
34
35 Flag stage1
36     Description: Is this stage 1?
37
38 Library
39     Exposed: False
40
41     if flag(base4)
42         Build-Depends: base       >= 4   && < 5
43     if flag(base3)
44         Build-Depends: base       >= 3   && < 4
45     if !flag(base3) && !flag(base4)
46         Build-Depends: base       < 3
47
48     if flag(base4)
49         Build-Depends: concurrent >= 0.1 && < 0.2,
50                        st         >= 0.1 && < 0.2
51
52     if flag(base3) || flag(base4)
53         Build-Depends: directory  >= 1   && < 1.1,
54                        process    >= 1   && < 1.1,
55                        bytestring >= 0.9 && < 0.10,
56                        old-time   >= 1   && < 1.1,
57                        containers >= 0.1 && < 0.2,
58                        array      >= 0.1 && < 0.2
59
60     Build-Depends: filepath >= 1 && < 1.2
61     Build-Depends: haskell98, Cabal, hpc
62     if os(windows)
63         Build-Depends: Win32
64     else
65         Build-Depends: unix
66
67     if flag(editline)
68         Build-Depends: editline
69         CPP-Options: -DUSE_EDITLINE
70
71     GHC-Options: -Wall -fno-warn-name-shadowing -fno-warn-orphans
72
73     if flag(ghci)
74         Build-Depends: template-haskell
75         CPP-Options: -DGHCI
76         Include-Dirs: ../libffi/build/include
77
78     if !flag(ncg)
79         CPP-Options: -DOMIT_NATIVE_CODEGEN
80
81     -- GHC 6.4.2 needs to be able to find WCsubst.c, which needs to be
82     -- able to find WCsubst.h
83     Include-Dirs: ../libraries/base/cbits, ../libraries/base/include
84
85     Extensions: CPP, MagicHash, UnboxedTuples, PatternGuards,
86                 ForeignFunctionInterface, EmptyDataDecls,
87                 TypeSynonymInstances, MultiParamTypeClasses,
88                 FlexibleInstances, Rank2Types, ScopedTypeVariables
89
90     Include-Dirs: . parser utils
91
92     if flag(stage1)
93         Include-Dirs: stage1
94     else
95         Include-Dirs: stage2plus
96     Install-Includes: HsVersions.h, ghc_boot_platform.h
97
98     c-sources:
99         parser/cutils.c
100         utils/md5.c
101         -- For GHC < 6.5:
102         cbits/unicode.c
103
104     if flag(dynlibs)
105         c-sources:
106             ghci/keepCAFsForGHCi.c
107
108     hs-source-dirs:
109         basicTypes
110         cmm
111         codeGen
112         coreSyn
113         cprAnalysis
114         deSugar
115         ghci
116         hsSyn
117         iface
118         main
119         parser
120         prelude
121         profiling
122         rename
123         simplCore
124         simplStg
125         specialise
126         stgSyn
127         stranal
128         typecheck
129         types
130         utils
131         vectorise
132
133     Exposed-Modules:
134         BasicTypes
135         DataCon
136         Demand
137         Exception
138         Id
139         IdInfo
140         Literal
141         MkId
142         Module
143         Name
144         NameEnv
145         NameSet
146         NewDemand
147         OccName
148         RdrName
149         SrcLoc
150         UniqSupply
151         Unique
152         Var
153         VarEnv
154         VarSet
155         BlockId
156         CLabel
157         Cmm
158         CmmBrokenBlock
159         CmmCPS
160         CmmCPSGen
161         CmmCPSZ
162         CmmCallConv
163         CmmCommonBlockElimZ
164         CmmContFlowOpt
165         CmmCvt
166         CmmExpr
167         CmmInfo
168         CmmLex
169         CmmLint
170         CmmLive
171         CmmLiveZ
172         CmmOpt
173         CmmParse
174         CmmProcPoint
175         CmmProcPointZ
176         CmmSpillReload
177         CmmTx
178         CmmUtils
179         CmmZipUtil
180         DFMonad
181         Dataflow
182         MachOp
183         MkZipCfg
184         MkZipCfgCmm
185         OptimizationFuel
186         PprC
187         PprCmm
188         PprCmmZ
189         StackColor
190         StackPlacements
191         ZipCfg
192         ZipCfgCmmRep
193         ZipCfgExtras
194         ZipDataflow
195         Bitmap
196         CgBindery
197         CgCallConv
198         CgCase
199         CgClosure
200         CgCon
201         CgExpr
202         CgForeignCall
203         CgHeapery
204         CgHpc
205         CgInfoTbls
206         CgLetNoEscape
207         CgMonad
208         CgParallel
209         CgPrimOp
210         CgProf
211         CgStackery
212         CgTailCall
213         CgTicky
214         CgUtils
215         ClosureInfo
216         CodeGen
217         SMRep
218         CoreFVs
219         CoreLint
220         CorePrep
221         CoreSubst
222         CoreSyn
223         CoreTidy
224         CoreUnfold
225         CoreUtils
226         ExternalCore
227         MkCore
228         MkExternalCore
229         PprCore
230         PprExternalCore
231         CprAnalyse
232         Check
233         Coverage
234         Desugar
235         DsArrows
236         DsBinds
237         DsCCall
238         DsExpr
239         DsForeign
240         DsGRHSs
241         DsListComp
242         DsMonad
243         DsUtils
244         Match
245         MatchCon
246         MatchLit
247         HsBinds
248         HsDecls
249         HsDoc
250         HsExpr
251         HsImpExp
252         HsLit
253         HsPat
254         HsSyn
255         HsTypes
256         HsUtils
257         BinIface
258         BuildTyCl
259         IfaceEnv
260         IfaceSyn
261         IfaceType
262         LoadIface
263         MkIface
264         TcIface
265         BreakArray
266         CmdLineParser
267         CodeOutput
268         Config
269         Constants
270         DriverMkDepend
271         DriverPhases
272         DriverPipeline
273         DynFlags
274         ErrUtils
275         Finder
276         GHC
277         HeaderInfo
278         HscMain
279         HscStats
280         HscTypes
281         InteractiveEval
282         PackageConfig
283         Packages
284         ParsePkgConf
285         PprTyThing
286         StaticFlags
287         StaticFlagParser
288         SysTools
289         TidyPgm
290         Ctype
291         HaddockLex
292         HaddockParse
293         HaddockUtils
294         LexCore
295         Lexer
296         Parser
297         ParserCore
298         ParserCoreUtils
299         RdrHsSyn
300         ForeignCall
301         PrelInfo
302         PrelNames
303         PrelRules
304         PrimOp
305         TysPrim
306         TysWiredIn
307         CostCentre
308         SCCfinal
309         RnBinds
310         RnEnv
311         RnExpr
312         RnHsDoc
313         RnHsSyn
314         RnNames
315         RnPat
316         RnSource
317         RnTypes
318         CSE
319         FloatIn
320         FloatOut
321         LiberateCase
322         OccurAnal
323         SAT
324         SetLevels
325         SimplCore
326         SimplEnv
327         SimplMonad
328         SimplUtils
329         Simplify
330         SRT
331         SimplStg
332         StgStats
333         Rules
334         SpecConstr
335         Specialise
336         CoreToStg
337         StgLint
338         StgSyn
339         DmdAnal
340         SaAbsInt
341         SaLib
342         StrictAnal
343         WorkWrap
344         WwLib
345         FamInst
346         Inst
347         TcArrows
348         TcBinds
349         TcClassDcl
350         TcDefaults
351         TcDeriv
352         TcEnv
353         TcExpr
354         TcForeign
355         TcGenDeriv
356         TcHsSyn
357         TcHsType
358         TcInstDcls
359         TcMType
360         TcMatches
361         TcPat
362         TcRnDriver
363         TcRnMonad
364         TcRnTypes
365         TcRules
366         TcSimplify
367         TcTyClsDecls
368         TcTyDecls
369         TcTyFuns
370         TcType
371         TcUnify
372         Class
373         Coercion
374         FamInstEnv
375         FunDeps
376         Generics
377         InstEnv
378         TyCon
379         Type
380         TypeRep
381         Unify
382         Bag
383         Binary
384         BufWrite
385         Digraph
386         Encoding
387         FastBool
388         FastFunctions
389         FastMutInt
390         FastString
391         FastTypes
392         Fingerprint
393         FiniteMap
394         GraphBase
395         GraphColor
396         GraphOps
397         GraphPpr
398         IOEnv
399         Interval
400         LazyUniqFM
401         ListSetOps
402         Maybes
403         MonadUtils
404         OrdList
405         Outputable
406         Panic
407         Pretty
408         State
409         StringBuffer
410         Unicode
411         UniqFM
412         UniqSet
413         Util
414         VectBuiltIn
415         VectCore
416         VectMonad
417         VectType
418         VectUtils
419         Vectorise
420
421     if flag(ncg)
422         hs-source-dirs:
423             nativeGen
424
425         Exposed-Modules:
426             AsmCodeGen
427             MachCodeGen
428             MachInstrs
429             MachRegs
430             NCGMonad
431             PositionIndependentCode
432             PprMach
433             RegAllocColor
434             RegAllocInfo
435             RegAllocLinear
436             RegAllocStats
437             RegArchBase
438             RegArchX86
439             RegCoalesce
440             RegLiveness
441             RegSpill
442             RegSpillClean
443             RegSpillCost
444
445     if flag(ghci)
446         Exposed-Modules:
447             DsMeta
448             TcSplice
449             Convert
450             ByteCodeAsm
451             ByteCodeFFI
452             ByteCodeGen
453             ByteCodeInstr
454             ByteCodeItbls
455             ByteCodeLink
456             Debugger
457             GhciMonad
458             GhciTags
459             InteractiveUI
460             LibFFI
461             Linker
462             ObjLink
463             RtClosureInspect
464