X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=utils%2Fghc-cabal%2Fghc-cabal.hs;h=fb1c870f3d722224a5af52e9e3e5efe6b9d312a4;hb=915ea7223dfd3050922008b0ca6dfdf921b31578;hp=2e967e935bfc133c798699c5306bc9d853e39435;hpb=a4bef988fe1fcc2f6e59d9f8ccb54bcbc893958e;p=ghc-hetmet.git diff --git a/utils/ghc-cabal/ghc-cabal.hs b/utils/ghc-cabal/ghc-cabal.hs index 2e967e9..fb1c870 100644 --- a/utils/ghc-cabal/ghc-cabal.hs +++ b/utils/ghc-cabal/ghc-cabal.hs @@ -176,7 +176,7 @@ doInstall ghc ghcpkg strip topdir directory distDir libsubdir = toPathTemplate "$pkgid", docdir = toPathTemplate $ if relocatableBuild - then "$topdir/$pkgid" + then "$topdir/../doc/html/libraries/$pkgid" else (myDocdir "$pkgid"), htmldir = toPathTemplate "$docdir" } @@ -328,7 +328,16 @@ generate config_args distdir directory -- GHC's rts package: hackRtsPackage index = case PackageIndex.lookupPackageName index (PackageName "rts") of - [(_,[rts])] -> PackageIndex.insert rts{ Installed.ldOptions = [] } index + [(_,[rts])] -> + PackageIndex.insert rts{ + Installed.ldOptions = [], + Installed.libraryDirs = filter (not . ("gcc-lib" `isSuffixOf`)) (Installed.libraryDirs rts)} index + -- GHC <= 6.12 had $topdir/gcc-lib in their + -- library-dirs for the rts package, which causes + -- problems when we try to use the in-tree mingw, + -- due to accidentally picking up the incompatible + -- libraries there. So we filter out gcc-lib from + -- the RTS's library-dirs here. _ -> error "No (or multiple) ghc rts package is registered!!" dep_ids = map snd (externalPackageDeps lbi) @@ -336,6 +345,7 @@ generate config_args distdir directory let variablePrefix = directory ++ '_':distdir let xs = [variablePrefix ++ "_VERSION = " ++ display (pkgVersion (package pd)), variablePrefix ++ "_MODULES = " ++ unwords (map display modules), + variablePrefix ++ "_HIDDEN_MODULES = " ++ unwords (map display (otherModules bi)), variablePrefix ++ "_SYNOPSIS =" ++ synopsis pd, variablePrefix ++ "_HS_SRC_DIRS = " ++ unwords (hsSourceDirs bi), variablePrefix ++ "_DEPS = " ++ unwords (map display dep_ids), @@ -347,6 +357,7 @@ generate config_args distdir directory variablePrefix ++ "_EXTRA_LIBDIRS = " ++ unwords (extraLibDirs bi), variablePrefix ++ "_C_SRCS = " ++ unwords (cSources bi), variablePrefix ++ "_CMM_SRCS = $(addprefix cbits/,$(notdir $(wildcard " ++ directory ++ "/cbits/*.cmm)))", + variablePrefix ++ "_DATA_FILES = " ++ unwords (dataFiles pd), -- XXX This includes things it shouldn't, like: -- -odir dist-bootstrapping/build variablePrefix ++ "_HC_OPTS = " ++ escape (unwords