aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-03-24 11:04:31 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-03-24 11:04:31 +0000
commit611a30585cb6ee482bfd0eeb2c0feb9e678325fd (patch)
tree3e762b1a7348bf4faaeea1402f0a016412e17948
parentfeba58ecdacf70498f745c91085ed5a40dad3023 (diff)
update for new GHC build system layout
-rw-r--r--ghc.mk2
-rw-r--r--src/Main.hs8
2 files changed, 9 insertions, 1 deletions
diff --git a/ghc.mk b/ghc.mk
index 054f780c..7020834c 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -3,7 +3,7 @@ utils/haddock_USES_CABAL = YES
utils/haddock_PACKAGE = haddock
utils/haddock_CONFIGURE_OPTS = --flag in-ghc-tree
# XXX This is a temporary hack:
-utils/haddock_HC_OPTS += -Wwarn
+utils/haddock_HC_OPTS += -Wwarn -DNEW_GHC_LAYOUT
utils/haddock_dist_SHELL_WRAPPER = YES
utils/haddock_dist_INSTALL_SHELL_WRAPPER = YES
utils/haddock_dist_PROG = haddock$(exeext)
diff --git a/src/Main.hs b/src/Main.hs
index cde7790c..c4b916b6 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -156,7 +156,11 @@ main = handleTopExceptions $ do
do m <- getExecDir
case m of
Nothing -> error "No GhcLibDir found"
+#ifdef NEW_GHC_LAYOUT
+ Just d -> return (d </> ".." </> "lib")
+#else
Just d -> return (d </> "..")
+#endif
#else
return libdir -- from GHC.Paths
#endif
@@ -237,7 +241,11 @@ render flags ifaces installedIfaces = do
do m <- getExecDir
case m of
Nothing -> error "No libdir found"
+#ifdef NEW_GHC_LAYOUT
+ Just d -> return (d </> ".." </> "lib")
+#else
Just d -> return (d </> "..")
+#endif
#else
getDataDir -- provided by Cabal
#endif