summaryrefslogtreecommitdiff
path: root/ghc/Makefile
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2008-07-16 22:24:57 +0000
committerIan Lynagh <igloo@earth.li>2008-07-16 22:24:57 +0000
commitf18200e94cd2d240e7fd38494c3244ec253596a6 (patch)
treec4f460a46dcd905c5852874db145c639c42857c8 /ghc/Makefile
parent4fb8029305b76289dc831f84035b85a02c1070b3 (diff)
downloadhaskell-f18200e94cd2d240e7fd38494c3244ec253596a6.tar.gz
Fix GHC finding extra-gcc-opts on Windows
Diffstat (limited to 'ghc/Makefile')
-rw-r--r--ghc/Makefile17
1 files changed, 15 insertions, 2 deletions
diff --git a/ghc/Makefile b/ghc/Makefile
index 210938acc0..4bd84b963c 100644
--- a/ghc/Makefile
+++ b/ghc/Makefile
@@ -33,9 +33,21 @@ clean distclean::
$(RM) -rf stage1-inplace
$(RM) -rf stage2-inplace
+# XXX Eugh, can we do this better? The problem is making extra-gcc-opts
+# infdable on both Linux and Windows. I guess this will go away when we
+# drop the mangler?
+ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
+SET_DATA_SUBDIR = --datasubdir=.
+INPLACE_DATA_DIR = '$$prefix'
+else
+SET_DATA_SUBDIR =
+INPLACE_DATA_DIR = '$$prefix/data'
+endif
+
build.stage1:
$(CABAL) configure --distpref dist-stage1 \
--flags=-ghci \
+ $(SET_DATA_SUBDIR) \
$(INSTALL_DIRS_CONFIGURE_FLAGS) \
$(USE_BOOT_CONFIGURE_FLAGS) \
$(COMMON_CONFIGURE_FLAGS)
@@ -47,7 +59,7 @@ build.stage1:
'$$prefix/lib' \
'$$prefix/libexec' \
'$$prefix/dynlib' \
- '$$prefix/data' \
+ $(INPLACE_DATA_DIR) \
'$$prefix/doc' \
'$$prefix/html' \
'$$prefix/haddock' \
@@ -77,6 +89,7 @@ endif
build.stage2:
$(CABAL) configure --distpref dist-stage2 \
+ $(SET_DATA_SUBDIR) \
$(CONFIGURE_FLAGS_STAGE2) \
$(INSTALL_DIRS_CONFIGURE_FLAGS) \
$(USE_STAGE1_CONFIGURE_FLAGS) \
@@ -89,7 +102,7 @@ build.stage2:
'$$prefix/lib' \
'$$prefix/libexec' \
'$$prefix/dynlib' \
- '$$prefix/data' \
+ $(INPLACE_DATA_DIR) \
'$$prefix/doc' \
'$$prefix/html' \
'$$prefix/haddock' \