Skip to content

Commit

Permalink
Merge pull request #7 from pcapriotti/master
Browse files Browse the repository at this point in the history
Fix cabal-install build.
  • Loading branch information
kosmikus committed May 16, 2012
2 parents dc526c9 + 7e935fe commit 80ed85e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cabal-install/Distribution/Client/SetupWrapper.hs
Expand Up @@ -41,7 +41,8 @@ import Distribution.PackageDescription.Parse
import Distribution.Simple.Configure import Distribution.Simple.Configure
( configCompiler ) ( configCompiler )
import Distribution.Simple.Compiler import Distribution.Simple.Compiler
( CompilerFlavor(GHC), Compiler, PackageDB(..), PackageDBStack ) ( CompilerFlavor(GHC), Compiler, PackageDB(..), PackageDBStack
, compilerVersion )
import Distribution.Simple.Program import Distribution.Simple.Program
( ProgramConfiguration, emptyProgramConfiguration ( ProgramConfiguration, emptyProgramConfiguration
, rawSystemProgramConf, ghcProgram ) , rawSystemProgramConf, ghcProgram )
Expand Down Expand Up @@ -286,14 +287,14 @@ externalSetupMethod verbosity options pkg bt mkargs = do
let outOfDate = setupHsNewer || cabalVersionNewer let outOfDate = setupHsNewer || cabalVersionNewer
when outOfDate $ do when outOfDate $ do
debug verbosity "Setup script is out of date, compiling..." debug verbosity "Setup script is out of date, compiling..."
(_, conf, compiler) <- configureCompiler options' (compiler, conf, _) <- configureCompiler options'
--TODO: get Cabal's GHC module to export a GhcOptions type and render func --TODO: get Cabal's GHC module to export a GhcOptions type and render func
rawSystemProgramConf verbosity ghcProgram conf $ rawSystemProgramConf verbosity ghcProgram conf $
ghcVerbosityOptions verbosity ghcVerbosityOptions verbosity
++ ["--make", setupHsFile, "-o", setupProgFile ++ ["--make", setupHsFile, "-o", setupProgFile
,"-odir", setupDir, "-hidir", setupDir ,"-odir", setupDir, "-hidir", setupDir
,"-i", "-i" ++ workingDir ] ,"-i", "-i" ++ workingDir ]
++ ghcPackageDbOptions (usePackageDB options') ++ ghcPackageDbOptions compiler (usePackageDB options')
++ if packageName pkg == PackageName "Cabal" ++ if packageName pkg == PackageName "Cabal"
then [] then []
else ["-package", display cabalPkgid] else ["-package", display cabalPkgid]
Expand Down

0 comments on commit 80ed85e

Please sign in to comment.