summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-09-14 11:05:50 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-09-14 11:05:50 +0000
commitf314da8e1877e24c405630c6e8335b8f5bd49778 (patch)
treefc903fc514a530e5bee932c0f8cec334a4ff212a /utils
parent33e51a3a20024561b2f9c38a35f4a00856b25ce1 (diff)
downloadhaskell-f314da8e1877e24c405630c6e8335b8f5bd49778.tar.gz
Fix build on Windows
Diffstat (limited to 'utils')
-rw-r--r--utils/ghc-pkg/Main.hs4
-rw-r--r--utils/ghc-pkg/ghc.mk5
2 files changed, 6 insertions, 3 deletions
diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs
index aa81178bdc..2ddf315259 100644
--- a/utils/ghc-pkg/Main.hs
+++ b/utils/ghc-pkg/Main.hs
@@ -73,7 +73,7 @@ import System.Process(runInteractiveCommand)
import qualified System.Info(os)
#endif
-#if __GLASGOW_HASKELL__ >= 611
+#if !defined(mingw32_HOST_OS) && __GLASGOW_HASKELL__ >= 611
import System.Console.Terminfo as Terminfo
#endif
@@ -845,7 +845,7 @@ listPackages verbosity my_flags mPackageName mModuleName = do
if simple_output then show_simple stack else do
-#if __GLASGOW_HASKELL__ < 611
+#if defined(mingw32_HOST_OS) || __GLASGOW_HASKELL__ < 611
mapM_ show_normal stack
#else
let
diff --git a/utils/ghc-pkg/ghc.mk b/utils/ghc-pkg/ghc.mk
index 5aa091f18f..dccd057d88 100644
--- a/utils/ghc-pkg/ghc.mk
+++ b/utils/ghc-pkg/ghc.mk
@@ -82,7 +82,10 @@ $(eval $(call clean-target,utils/ghc-pkg,dist,\
utils/ghc-pkg_dist-install_PROG = ghc-pkg
utils/ghc-pkg_dist-install_MODULES = Main Version
-utils/ghc-pkg_dist-install_DEPS = Cabal terminfo bin-package-db
+utils/ghc-pkg_dist-install_DEPS = Cabal bin-package-db
+ifeq "$(Windows)" "NO"
+utils/ghc-pkg_dist-install_DEPS += terminfo
+endif
utils/ghc-pkg_dist-install_SHELL_WRAPPER = YES
utils/ghc-pkg_dist-install_INSTALL_SHELL_WRAPPER = YES
utils/ghc-pkg_dist-install_INSTALL_SHELL_WRAPPER_NAME = ghc-pkg-$(ProjectVersion)