summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-10-24 17:49:42 +0100
committerIan Lynagh <ian@well-typed.com>2012-10-24 18:03:34 +0100
commit68ae113299dbf2928cf0a8c4400b960620136738 (patch)
treedba89f6d09b9ba5ce19ebd287d9e5701e7fd6d26 /utils
parentb8da5dd3c55d766f0229abb46a1e5c7819d2cd73 (diff)
downloadhaskell-68ae113299dbf2928cf0a8c4400b960620136738.tar.gz
Make it possible to build with only way dyn
Diffstat (limited to 'utils')
-rw-r--r--utils/ghc-cabal/Main.hs25
-rw-r--r--utils/ghc-cabal/ghc.mk2
-rw-r--r--utils/ghc-pwd/ghc.mk2
-rw-r--r--utils/mkUserGuidePart/ghc.mk1
4 files changed, 21 insertions, 9 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))
diff --git a/utils/ghc-pwd/ghc.mk b/utils/ghc-pwd/ghc.mk
index f2feef4f52..e9c0d4aff4 100644
--- a/utils/ghc-pwd/ghc.mk
+++ b/utils/ghc-pwd/ghc.mk
@@ -2,8 +2,8 @@
utils/ghc-pwd_USES_CABAL = YES
utils/ghc-pwd_PACKAGE = ghc-pwd
utils/ghc-pwd_dist-install_INSTALL_INPLACE = YES
+utils/ghc-pwd_dist-install_WANT_BINDIST_WRAPPER = YES
utils/ghc-pwd_dist-install_PROG = ghc-pwd$(exeext)
-utils/ghc-pwd_dist-install_MORE_HC_OPTS += -static
$(eval $(call build-prog,utils/ghc-pwd,dist-install,1))
diff --git a/utils/mkUserGuidePart/ghc.mk b/utils/mkUserGuidePart/ghc.mk
index 98dc298c30..ae305f9139 100644
--- a/utils/mkUserGuidePart/ghc.mk
+++ b/utils/mkUserGuidePart/ghc.mk
@@ -14,6 +14,5 @@ utils/mkUserGuidePart_USES_CABAL = YES
utils/mkUserGuidePart_PACKAGE = mkUserGuidePart
utils/mkUserGuidePart_dist_PROG = mkUserGuidePart$(exeext)
utils/mkUserGuidePart_dist_INSTALL_INPLACE = YES
-utils/mkUserGuidePart_dist_PROGRAM_WAY = v
$(eval $(call build-prog,utils/mkUserGuidePart,dist,1))