From: Ian Lynagh Date: Wed, 16 Jul 2008 22:24:57 +0000 (+0000) Subject: Fix GHC finding extra-gcc-opts on Windows X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=f18200e94cd2d240e7fd38494c3244ec253596a6 Fix GHC finding extra-gcc-opts on Windows --- diff --git a/ghc/Makefile b/ghc/Makefile index 210938a..4bd84b9 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' \