Permalink
Browse files

Merge branch 'cabal-1.16' of git://github.com/haskell/cabal

Conflicts:
	cabal-install/Distribution/Client/Install.hs
  • Loading branch information...
phischu committed Aug 16, 2012
2 parents 7528aa6 + d50b2d3 commit b1a04a93f1ae592da25a9f98cc880103dc5ca635
View
@@ -4,3 +4,10 @@ cabal-dev/
Cabal/dist/
cabal-install/dist/
.hpc/
+
+# GHC build
+
+Cabal/GNUmakefile
+Cabal/dist-boot/
+Cabal/dist-install/
+Cabal/ghc.mk
View
@@ -1,5 +1,5 @@
Name: Cabal
-Version: 1.15.0
+Version: 1.16.0
Copyright: 2003-2006, Isaac Jones
2005-2011, Duncan Coutts
License: BSD3
@@ -43,15 +43,15 @@ Library
if flag(base4) { build-depends: base >= 4 } else { build-depends: base < 4 }
if flag(base3) { build-depends: base >= 3 } else { build-depends: base < 3 }
if flag(base3)
- Build-Depends: directory >= 1 && < 1.2,
+ Build-Depends: directory >= 1 && < 1.3,
process >= 1 && < 1.2,
old-time >= 1 && < 1.2,
containers >= 0.1 && < 0.6,
array >= 0.1 && < 0.5,
pretty >= 1 && < 1.2
if !os(windows)
- Build-Depends: unix >= 2.0 && < 2.6
+ Build-Depends: unix >= 2.0 && < 2.7
ghc-options: -Wall -fno-ignore-asserts
if impl(ghc >= 6.8)
@@ -270,9 +270,9 @@ viewAsFieldDescr (OptionField n dd) = FieldDescr n get set
Just f -> return (f a)
_ -> syntaxError line val
BoolOpt _ _ _ setV _ -> (`setV` a) `liftM` runP line n parse val
- OptArg _ _ _ _readE _ _ -> -- The behaviour in this case is not clear, and it has no use so far,
- -- so we avoid future surprises by not implementing it.
- error "Command.optionToFieldDescr: feature not implemented"
+ OptArg _ _ _ readE _ _ -> ($ a) `liftM` runE line n readE val
+ -- Optional arguments are parsed just like required arguments here;
+ -- we don't provide a method to set an OptArg field to the default value.
getChoiceByLongFlag :: OptDescr b -> String -> Maybe (b->b)
getChoiceByLongFlag (ChoiceOpt alts) val = listToMaybe [ set | (_,(_sf,lf:_), set, _) <- alts
@@ -631,20 +631,20 @@ buildLib verbosity pkg_descr lbi lib clbi = do
createDirectoryIfMissingVerbose verbosity True libTargetDir
-- TODO: do we need to put hs-boot files into place for mutually recurive modules?
let baseOpts = componentGhcOptions verbosity lbi libBi clbi libTargetDir
- vanillaOpts = baseOpts {
+ vanillaOpts = baseOpts `mappend` mempty {
ghcOptMode = toFlag GhcModeMake,
ghcOptPackageName = toFlag pkgid,
ghcOptInputModules = libModules lib
}
- profOpts = vanillaOpts {
+ profOpts = vanillaOpts `mappend` mempty {
ghcOptProfilingMode = toFlag True,
ghcOptHiSuffix = toFlag "p_hi",
ghcOptObjSuffix = toFlag "p_o",
ghcOptExtra = ghcProfOptions libBi
}
- sharedOpts = vanillaOpts {
+ sharedOpts = vanillaOpts `mappend` mempty {
ghcOptDynamic = toFlag True,
ghcOptFPic = toFlag True,
ghcOptHiSuffix = toFlag "dyn_hi",
@@ -662,10 +662,10 @@ buildLib verbosity pkg_descr lbi lib clbi = do
info verbosity "Building C Sources..."
sequence_
[ do let vanillaCcOpts = (componentCcGhcOptions verbosity lbi
- libBi clbi pref filename) {
+ libBi clbi pref filename) `mappend` mempty {
ghcOptProfilingMode = toFlag (withProfLib lbi)
}
- sharedCcOpts = vanillaOpts {
+ sharedCcOpts = vanillaCcOpts `mappend` mempty {
ghcOptFPic = toFlag True,
ghcOptDynamic = toFlag True,
ghcOptObjSuffix = toFlag "dyn_o"
@@ -812,7 +812,7 @@ buildExe verbosity _pkg_descr lbi
info verbosity "Building C Sources."
sequence_
[ do let opts = (componentCcGhcOptions verbosity lbi exeBi clbi
- exeDir filename) {
+ exeDir filename) `mappend` mempty {
ghcOptDynamic = toFlag (withDynExe lbi),
ghcOptProfilingMode = toFlag (withProfExe lbi)
}
@@ -824,7 +824,8 @@ buildExe verbosity _pkg_descr lbi
srcMainFile <- findFile (exeDir : hsSourceDirs exeBi) modPath
let cObjs = map (`replaceExtension` objExtension) (cSources exeBi)
- let vanillaOpts = (componentGhcOptions verbosity lbi exeBi clbi exeDir) {
+ let vanillaOpts = (componentGhcOptions verbosity lbi exeBi clbi exeDir)
+ `mappend` mempty {
ghcOptMode = toFlag GhcModeMake,
ghcOptInputFiles = [exeDir </> x | x <- cObjs]
++ [srcMainFile],
@@ -834,15 +835,15 @@ buildExe verbosity _pkg_descr lbi
ghcOptLinkFrameworks = PD.frameworks exeBi
}
- dynamicOpts = vanillaOpts {
+ dynamicOpts = vanillaOpts `mappend` mempty {
ghcOptDynamic = toFlag True,
ghcOptExtra = ghcSharedOptions exeBi
}
exeOpts | withDynExe lbi = dynamicOpts
| otherwise = vanillaOpts
- exeProfOpts = exeOpts {
+ exeProfOpts = exeOpts `mappend` mempty {
ghcOptProfilingMode = toFlag True,
ghcOptHiSuffix = toFlag "p_hi",
ghcOptObjSuffix = toFlag "p_o",
@@ -909,7 +910,8 @@ libAbiHash verbosity pkg_descr lbi lib clbi = do
(compiler lbi) (withProfLib lbi) (libBuildInfo lib)
let
ghcArgs =
- (componentGhcOptions verbosity lbi libBi clbi (buildDir lbi)) {
+ (componentGhcOptions verbosity lbi libBi clbi (buildDir lbi))
+ `mappend` mempty {
ghcOptMode = toFlag GhcModeAbiHash,
ghcOptPackageName = toFlag (packageId pkg_descr),
ghcOptInputModules = exposedModules lib
@@ -61,7 +61,7 @@ putBuildLog :: BuildReportId -> BuildLog
-> BrowserAction (HandleStream BuildLog) ()
putBuildLog reportId buildLog = do
--FIXME: do something if the request fails
- (_, response) <- request Request {
+ (_, _response) <- request Request {
rqURI = reportId{uriPath = uriPath reportId </> "log"},
rqMethod = PUT,
rqHeaders = [Header HdrContentType ("text/plain"),
@@ -36,6 +36,8 @@ import Distribution.Client.Setup
, UploadFlags(..), uploadCommand
, ReportFlags(..), reportCommand
, showRepo, parseRepo )
+import Distribution.Client.Utils
+ ( numberOfProcessors )
import Distribution.Simple.Compiler
( OptimisationLevel(..) )
@@ -200,7 +202,8 @@ initialSavedConfig = do
},
savedInstallFlags = mempty {
installSummaryFile = [toPathTemplate (logsDir </> "build.log")],
- installBuildReports= toFlag AnonymousReports
+ installBuildReports= toFlag AnonymousReports,
+ installNumJobs = toFlag (Just numberOfProcessors)
}
}
@@ -106,7 +106,8 @@ configure verbosity packageDBs repos comp conf
(configDistPref configFlags),
useLoggingHandle = Nothing,
useWorkingDir = Nothing,
- forceExternalSetupMethod = False
+ forceExternalSetupMethod = False,
+ setupCacheLock = Nothing
}
where
-- Hack: we typically want to allow the UserPackageDB for finding the
Oops, something went wrong.

0 comments on commit b1a04a9

Please sign in to comment.