[commit: Cabal] master: Use --with-compiler and --with-hc-pkg. (ecc9580)
Ian Lynagh
igloo at earth.li
Fri Jun 24 01:47:21 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/ecc958059854f83666738fb2a85a16c6ebe1539d
>---------------------------------------------------------------
commit ecc958059854f83666738fb2a85a16c6ebe1539d
Author: bjorn <bjorn at bringert.net>
Date: Sat Oct 13 12:34:12 2007 +0000
Use --with-compiler and --with-hc-pkg.
>---------------------------------------------------------------
cabal-install/Hackage/Config.hs | 8 ++++++--
cabal-install/Hackage/Setup.hs | 4 ++--
cabal-install/Hackage/Types.hs | 2 ++
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/cabal-install/Hackage/Config.hs b/cabal-install/Hackage/Config.hs
index ad2f1be..a8e88a8 100644
--- a/cabal-install/Hackage/Config.hs
+++ b/cabal-install/Hackage/Config.hs
@@ -128,11 +128,13 @@ pkgURL pkg = joinWith "/" [repoURL (pkgRepo pkg), pkgName p, showVersion (pkgVer
-- * Compiler and programs
--
--- FIXME: should use --with flags
findCompiler :: ConfigFlags -> IO (Compiler, ProgramConfiguration)
findCompiler cfg = Configure.configCompiler
(Just (configCompiler cfg))
- Nothing Nothing defaultProgramConfiguration (configVerbose cfg)
+ (configCompilerPath cfg)
+ (configHcPkgPath cfg)
+ defaultProgramConfiguration
+ (configVerbose cfg)
--
-- * Default config
@@ -159,6 +161,8 @@ defaultConfigFlags =
cacheDir <- defaultCacheDir
return $ ConfigFlags
{ configCompiler = defaultCompiler
+ , configCompilerPath = Nothing
+ , configHcPkgPath = Nothing
, configInstallDirs = installDirs { prefixDirTemplate = toPathTemplate defaultPrefix }
, configCacheDir = cacheDir
, configRepos = [Repo "hackage.haskell.org" "http://hackage.haskell.org/packages/archive"]
diff --git a/cabal-install/Hackage/Setup.hs b/cabal-install/Hackage/Setup.hs
index 3bf469c..af01351 100644
--- a/cabal-install/Hackage/Setup.hs
+++ b/cabal-install/Hackage/Setup.hs
@@ -81,8 +81,8 @@ configFromOptions :: ConfigFlags -> [Option] -> ConfigFlags
configFromOptions = foldr f
where f o cfg = case o of
OptCompilerFlavor c -> cfg { configCompiler = c}
- OptCompiler _ -> cfg -- FIXME: where do we store this?
- OptHcPkg _ -> cfg -- FIXME: where do we store this?
+ OptCompiler p -> cfg { configCompilerPath = Just p }
+ OptHcPkg p -> cfg { configHcPkgPath = Just p }
OptConfigFile _ -> cfg
OptCacheDir d -> cfg { configCacheDir = d }
OptPrefix d -> lib (\ds x -> ds { prefixDirTemplate = x }) d
diff --git a/cabal-install/Hackage/Types.hs b/cabal-install/Hackage/Types.hs
index 2e24267..6f2fa21 100644
--- a/cabal-install/Hackage/Types.hs
+++ b/cabal-install/Hackage/Types.hs
@@ -60,6 +60,8 @@ data Option = OptCompilerFlavor CompilerFlavor
data ConfigFlags = ConfigFlags {
configCompiler :: CompilerFlavor,
+ configCompilerPath :: Maybe FilePath,
+ configHcPkgPath :: Maybe FilePath,
configInstallDirs :: InstallDirTemplates,
configCacheDir :: FilePath,
configRepos :: [Repo], -- ^Available Hackage servers.
More information about the Cvs-libraries
mailing list