diff options
author | Ian Lynagh <ian@well-typed.com> | 2012-10-24 17:49:42 +0100 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2012-10-24 18:03:34 +0100 |
commit | 68ae113299dbf2928cf0a8c4400b960620136738 (patch) | |
tree | dba89f6d09b9ba5ce19ebd287d9e5701e7fd6d26 /utils/ghc-cabal | |
parent | b8da5dd3c55d766f0229abb46a1e5c7819d2cd73 (diff) | |
download | haskell-68ae113299dbf2928cf0a8c4400b960620136738.tar.gz |
Make it possible to build with only way dyn
Diffstat (limited to 'utils/ghc-cabal')
-rw-r--r-- | utils/ghc-cabal/Main.hs | 25 | ||||
-rw-r--r-- | utils/ghc-cabal/ghc.mk | 2 |
2 files changed, 20 insertions, 7 deletions
diff --git a/utils/ghc-cabal/Main.hs b/utils/ghc-cabal/Main.hs index e179fc8cbf..6878afe3bb 100644 --- a/utils/ghc-cabal/Main.hs +++ b/utils/ghc-cabal/Main.hs @@ -366,10 +366,22 @@ generate config_args distdir directory -- the RTS's library-dirs here. _ -> error "No (or multiple) ghc rts package is registered!!" - dep_ids = map snd (externalPackageDeps lbi) + dep_ids = map snd (externalPackageDeps lbi) + deps = map display dep_ids + depNames = map (display . packageName) dep_ids - let libraryDirs = forDeps Installed.libraryDirs transitive_dep_ids = map Installed.sourcePackageId dep_pkgs + transitiveDeps = map display transitive_dep_ids + transitiveDepNames = map (display . packageName) transitive_dep_ids + + libraryDirs = forDeps Installed.libraryDirs + -- The mkLibraryRelDir function is a bit of a hack. + -- Ideally it should be handled in the makefiles instead. + mkLibraryRelDir "rts" = "rts/dist/build" + mkLibraryRelDir "ghc" = "compiler/stage2/build" + mkLibraryRelDir "Cabal" = "libraries/Cabal/Cabal/dist-install/build" + mkLibraryRelDir l = "libraries/" ++ l ++ "/dist-install/build" + libraryRelDirs = map mkLibraryRelDir transitiveDepNames wrappedIncludeDirs <- wrap $ forDeps Installed.includeDirs wrappedLibraryDirs <- wrap libraryDirs @@ -379,10 +391,10 @@ generate config_args distdir directory 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), - variablePrefix ++ "_DEP_NAMES = " ++ unwords (map (display . packageName) dep_ids), - variablePrefix ++ "_TRANSITIVE_DEPS = " ++ unwords (map display transitive_dep_ids), - variablePrefix ++ "_TRANSITIVE_DEP_NAMES = " ++ unwords (map (display . packageName) transitive_dep_ids), + variablePrefix ++ "_DEPS = " ++ unwords deps, + variablePrefix ++ "_DEP_NAMES = " ++ unwords depNames, + variablePrefix ++ "_TRANSITIVE_DEPS = " ++ unwords transitiveDeps, + variablePrefix ++ "_TRANSITIVE_DEP_NAMES = " ++ unwords transitiveDepNames, variablePrefix ++ "_INCLUDE_DIRS = " ++ unwords (includeDirs bi), variablePrefix ++ "_INCLUDES = " ++ unwords (includes bi), variablePrefix ++ "_INSTALL_INCLUDES = " ++ unwords (installIncludes bi), @@ -406,6 +418,7 @@ generate config_args distdir directory variablePrefix ++ "_DEP_CC_OPTS = " ++ unwords (forDeps Installed.ccOptions), variablePrefix ++ "_DEP_LIB_DIRS_SINGLE_QUOTED = " ++ unwords wrappedLibraryDirs, variablePrefix ++ "_DEP_LIB_DIRS_SEARCHPATH = " ++ mkSearchPath libraryDirs, + variablePrefix ++ "_DEP_LIB_REL_DIRS_SEARCHPATH = " ++ mkSearchPath libraryRelDirs, variablePrefix ++ "_DEP_EXTRA_LIBS = " ++ unwords (forDeps Installed.extraLibraries), variablePrefix ++ "_DEP_LD_OPTS = " ++ unwords (forDeps Installed.ldOptions), variablePrefix ++ "_BUILD_GHCI_LIB = " ++ boolToYesNo (withGHCiLib lbi), diff --git a/utils/ghc-cabal/ghc.mk b/utils/ghc-cabal/ghc.mk index ae1a213122..de0c5f21ae 100644 --- a/utils/ghc-cabal/ghc.mk +++ b/utils/ghc-cabal/ghc.mk @@ -54,8 +54,8 @@ $(GHC_CABAL_DIR)_USES_CABAL = YES $(GHC_CABAL_DIR)_PACKAGE = ghc-cabal $(GHC_CABAL_DIR)_dist-install_PROG = ghc-cabal$(exeext) $(GHC_CABAL_DIR)_dist-install_INSTALL_INPLACE = NO +$(GHC_CABAL_DIR)_dist-install_WANT_BINDIST_WRAPPER = YES $(GHC_CABAL_DIR)_dist-install_MODULES = Main -$(GHC_CABAL_DIR)_dist-install_MORE_HC_OPTS = -static $(eval $(call build-prog,utils/ghc-cabal,dist-install,1)) |