Fix build on Windows
authorSimon Marlow <marlowsd@gmail.com>
Mon, 14 Sep 2009 11:05:50 +0000 (11:05 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Mon, 14 Sep 2009 11:05:50 +0000 (11:05 +0000)
utils/ghc-pkg/Main.hs
utils/ghc-pkg/ghc.mk

index aa81178..2ddf315 100644 (file)
@@ -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
index 5aa091f..dccd057 100644 (file)
@@ -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)