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