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