Commit 6a0c30ff authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Add ghc-bin package.

parent 92530496
module GHC (
array, base, binPackageDb, binary, bytestring, cabal, compiler, containers,
deepseq, directory, filepath, ghcPrim, haskeline, hoopl, hpc, integerGmp,
integerSimple, parallel, pretty, primitive, process, stm, templateHaskell,
terminfo, time, transformers, unix, win32, xhtml,
deepseq, directory, filepath, ghc, ghcPrim, haskeline, hoopl, hpc,
integerGmp, integerSimple, parallel, pretty, primitive, process, stm,
templateHaskell, terminfo, time, transformers, unix, win32, xhtml,
defaultKnownPackages, defaultTargetDirectory
) where
......@@ -18,15 +18,15 @@ import Stage
defaultKnownPackages :: [Package]
defaultKnownPackages =
[ array, base, binPackageDb, binary, bytestring, cabal, compiler
, containers, deepseq, directory, filepath, ghcPrim, haskeline, hoopl, hpc
, integerGmp, integerSimple, parallel, pretty, primitive, process, stm
, containers, deepseq, directory, filepath, ghc, ghcPrim, haskeline, hoopl
, hpc, integerGmp, integerSimple, parallel, pretty, primitive, process, stm
, templateHaskell, terminfo, time, transformers, unix, win32, xhtml ]
-- Package definitions
array, base, binPackageDb, binary, bytestring, cabal, compiler, containers,
deepseq, directory, filepath, ghcPrim, haskeline, hoopl, hpc, integerGmp,
integerSimple, parallel, pretty, primitive, process, stm, templateHaskell,
terminfo, time, transformers, unix, win32, xhtml :: Package
deepseq, directory, filepath, ghc, ghcPrim, haskeline, hoopl, hpc,
integerGmp, integerSimple, parallel, pretty, primitive, process, stm,
templateHaskell, terminfo, time, transformers, unix, win32, xhtml :: Package
array = library "array"
base = library "base"
......@@ -39,6 +39,7 @@ containers = library "containers"
deepseq = library "deepseq"
directory = library "directory"
filepath = library "filepath"
ghc = topLevel "ghc-bin" `setPath` "ghc"
ghcPrim = library "ghc-prim"
haskeline = library "haskeline"
hoopl = library "hoopl"
......@@ -67,5 +68,6 @@ xhtml = library "xhtml"
defaultTargetDirectory :: Stage -> Package -> FilePath
defaultTargetDirectory stage package
| package == compiler = "stage" ++ show (fromEnum stage + 1)
| package == ghc = "stage" ++ show (fromEnum stage + 1)
| stage == Stage0 = "dist-boot"
| otherwise = "dist-install"
......@@ -166,6 +166,12 @@ customPackageArgs = do
, ghcProfiled ?
notStage0 ? arg "--ghc-pkg-option=--force"
]
, package ghc ?
builder GhcCabal ?
mconcat [ arg $ "--flags=stage" ++ show nextStage
, ghcWithInterpreter ?
notStage0 ? arg "--flags=ghci"
]
]
withBuilderKey :: Builder -> String
......
......@@ -16,7 +16,7 @@ defaultPackages = mconcat
packagesStage0 :: Packages
packagesStage0 = mconcat
[ append [ binPackageDb, binary, cabal, compiler, hoopl, hpc, transformers ]
[ append [ binPackageDb, binary, cabal, compiler, ghc, hoopl, hpc, transformers ]
, notM windowsHost ? notM (anyHostOs ["ios"]) ? append [terminfo] ]
-- TODO: what do we do with parallel, stm, random, primitive, vector and dph?
......@@ -24,8 +24,8 @@ packagesStage1 :: Packages
packagesStage1 = mconcat
[ packagesStage0
, append [ array, base, bytestring, containers, deepseq, directory
, filepath, ghcPrim, haskeline, integerLibrary, pretty, process
, templateHaskell, time ]
, filepath, ghc, ghcPrim, haskeline, integerLibrary, pretty
, process, templateHaskell, time ]
, windowsHost ? append [win32]
, notM windowsHost ? append [unix]
, buildHaddock ? append [xhtml] ]
......
......@@ -15,7 +15,7 @@ userArgs = mempty
-- Control which packages get to be built
userPackages :: Packages
userPackages = mempty
userPackages = remove [ghc]
-- Add new user-defined packages
userKnownPackages :: [Package]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment