Build system tweaks
authorIan Lynagh <igloo@earth.li>
Fri, 18 Jul 2008 18:47:06 +0000 (18:47 +0000)
committerIan Lynagh <igloo@earth.li>
Fri, 18 Jul 2008 18:47:06 +0000 (18:47 +0000)
ghc/Makefile
mk/cabal-flags.mk
mk/cabal.mk
utils/ghc-pkg/Makefile

index f824e3a..43e40a4 100644 (file)
@@ -68,7 +68,8 @@ boot.stage.%:
        $(CABAL) configure --distpref dist-stage$* \
                           $(INSTALL_DIRS_CONFIGURE_FLAGS) \
                           $(CONFIGURE_FLAGS_STAGE$*) \
-                          $(COMMON_CONFIGURE_FLAGS)
+                          $(COMMON_CONFIGURE_FLAGS) \
+                          --datasubdir=. \
 
 build.stage.%:
        $(CABAL) build     --distpref dist-stage$* $(BUILD_FLAGS)
index 4483dc6..ae6a6c3 100644 (file)
@@ -56,16 +56,17 @@ INSTALL_DIRS_CONFIGURE_FLAGS = \
     --libdir=$(NONEXISTENT) \
     --libexecdir=$(NONEXISTENT) \
     --datadir=$(NONEXISTENT) \
-    --datasubdir=. \
     --docdir=$(NONEXISTENT) \
     --haddockdir=$(NONEXISTENT) \
     --htmldir=$(NONEXISTENT)
 
-INPLACE_DIRS_CONFIGURE_FLAGS = \
-    --prefix=`$(FPTOOLS_TOP_ABS)/utils/pwd/pwd forwardslash`/install-inplace \
+INPLACE_GHC_DATADIR_CONFIGURE_FLAGS = \
     --datadir=$(FPTOOLS_TOP_ABS)/inplace-datadir \
     --datasubdir=.
 
+INPLACE_DIRS_CONFIGURE_FLAGS = \
+    --prefix=`$(FPTOOLS_TOP_ABS)/utils/pwd/pwd forwardslash`/install-inplace
+
 USE_BOOT_CONFIGURE_FLAGS = \
     --with-compiler=$(GHC) \
     --with-hc-pkg=$(GHC_PKG) \
index 5e0de0d..f8d2b7b 100644 (file)
@@ -20,10 +20,11 @@ endif
 default all: with-bootstrapping-compiler
 
 with-bootstrapping-compiler:
-       $(CABAL) configure --distpref dist-inplace         \
-                          $(INPLACE_DIRS_CONFIGURE_FLAGS) \
-                          $(USE_BOOT_CONFIGURE_FLAGS)     \
-                          $(COMMON_CONFIGURE_FLAGS)
+       $(CABAL) configure --distpref dist-inplace          \
+                          $(INPLACE_DIRS_CONFIGURE_FLAGS)  \
+                          $(USE_BOOT_CONFIGURE_FLAGS)      \
+                          $(COMMON_CONFIGURE_FLAGS)        \
+                          $(EXTRA_INPLACE_CONFIGURE_FLAGS)
        $(CABAL) build     --distpref dist-inplace $(BUILD_FLAGS)
        $(CABAL) install   --distpref dist-inplace $(INSTALL_FLAGS)
 
@@ -31,7 +32,8 @@ with-stage-1:
        $(CABAL) configure --distpref dist-install         \
                           $(INSTALL_DIRS_CONFIGURE_FLAGS) \
                           $(USE_STAGE1_CONFIGURE_FLAGS)   \
-                          $(COMMON_CONFIGURE_FLAGS)
+                          $(COMMON_CONFIGURE_FLAGS)       \
+                          $(EXTRA_STAGE1_CONFIGURE_FLAGS)
        $(CABAL) build     --distpref dist-install $(BUILD_FLAGS)
 
 install:
index 61e4893..560fa4a 100644 (file)
@@ -2,6 +2,7 @@
 TOP=../..
 ENABLE_SHELL_WRAPPERS = YES
 EXTRA_CLEAN = Version.hs
+EXTRA_INPLACE_CONFIGURE_FLAGS = $(INPLACE_GHC_DATADIR_CONFIGURE_FLAGS)
 
 include $(TOP)/mk/boilerplate.mk
 include $(TOP)/mk/cabal.mk