Commit bbc6e4a2 authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Add support for building ghc-pkg.

parent 3021dbeb
module GHC (
array, base, binPackageDb, binary, bytestring, cabal, compiler, containers,
deepseq, directory, filepath, ghc, ghcCabal, ghcPrim, haskeline, hoopl, hpc,
integerGmp, integerSimple, parallel, pretty, primitive, process, stm,
templateHaskell, terminfo, time, transformers, unix, win32, xhtml,
deepseq, directory, filepath, ghc, ghcCabal, ghcPkg, ghcPrim, haskeline,
hoopl, hpc, integerGmp, integerSimple, parallel, pretty, primitive, process,
stm, templateHaskell, terminfo, time, transformers, unix, win32, xhtml,
defaultKnownPackages, defaultTargetDirectory, defaultProgramPath
) where
......@@ -19,16 +19,16 @@ import Stage
defaultKnownPackages :: [Package]
defaultKnownPackages =
[ array, base, binPackageDb, binary, bytestring, cabal, compiler
, containers, deepseq, directory, filepath, ghc, ghcCabal, ghcPrim
, containers, deepseq, directory, filepath, ghc, ghcCabal, ghcPkg, 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, ghc, ghcCabal, ghcPrim, haskeline, hoopl, hpc,
integerGmp, integerSimple, parallel, pretty, primitive, process, stm,
templateHaskell, terminfo, time, transformers, unix, win32, xhtml :: Package
deepseq, directory, filepath, ghc, ghcCabal, ghcPkg, 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"
......@@ -43,6 +43,7 @@ directory = library "directory"
filepath = library "filepath"
ghc = topLevel "ghc-bin" `setPath` "ghc"
ghcCabal = utility "ghc-cabal"
ghcPkg = utility "ghc-pkg"
ghcPrim = library "ghc-prim"
haskeline = library "haskeline"
hoopl = library "hoopl"
......@@ -80,6 +81,7 @@ defaultProgramPath :: Stage -> Package -> Maybe FilePath
defaultProgramPath stage pkg
| pkg == ghc = program $ "ghc-stage" ++ show (fromEnum stage + 1)
| pkg == ghcCabal = program $ pkgName pkg
| pkg == ghcPkg = program $ pkgName pkg
| otherwise = Nothing
where
program name = Just $ pkgPath pkg -/- defaultTargetDirectory stage pkg
......
......@@ -25,8 +25,8 @@ packagesStage1 :: Packages
packagesStage1 = mconcat
[ packagesStage0
, append [ array, base, bytestring, containers, deepseq, directory, filepath
, ghcCabal, ghcPrim, haskeline, integerLibrary, pretty, process
, time ]
, ghcCabal, ghcPkg, ghcPrim, haskeline, integerLibrary, pretty
, process, time ]
, windowsHost ? append [win32]
, notM windowsHost ? append [unix]
, buildHaddock ? append [xhtml] ]
......
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