3 include $(TOP)/mk/boilerplate.mk
4 include $(TOP)/mk/cabal-flags.mk
10 ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
13 INSTALL_FLAGS = --enable-shell-wrappers
19 all:: build.stage$(stage)
31 -$(CABAL) clean --distpref dist-stage1
32 -$(CABAL) clean --distpref dist-stage2
33 $(RM) -rf stage1-inplace
34 $(RM) -rf stage2-inplace
37 $(CABAL) configure --distpref dist-stage1 \
39 $(INSTALL_DIRS_CONFIGURE_FLAGS) \
40 $(USE_BOOT_CONFIGURE_FLAGS) \
41 $(COMMON_CONFIGURE_FLAGS)
42 $(CABAL) build --distpref dist-stage1 $(BUILD_FLAGS)
43 $(INSTALL_PACKAGE) install '$(GHC_PKG_PROG)' 'XXX/package.conf' "" \
44 $(FPTOOLS_TOP_ABS)/ghc/stage1-inplace \
45 $(FPTOOLS_TOP_ABS)/ghc/stage1-inplace \
54 --distpref dist-stage1 \
57 ifeq "$(GhcWithInterpreter)" "YES"
58 CONFIGURE_FLAGS_STAGE2 += --flags=ghci
60 CONFIGURE_FLAGS_STAGE2 += --flags=-ghci
63 ifeq "$(GhcProfiled)" "YES"
64 CONFIGURE_FLAGS_STAGE2 += --enable-executable-profiling
66 ifeq "$(GhcDebugged)" "YES"
67 CONFIGURE_FLAGS_STAGE2 += --ghc-option=-debug
69 ifeq "$(GhcThreaded)" "YES"
70 # Use threaded RTS with GHCi, so threads don't get blocked at the prompt.
71 CONFIGURE_FLAGS_STAGE2 += --ghc-option=-threaded
74 # XXX In stage2 we should really use the inplace ghc-pkg
75 # It works because installPackage doesn't actually use ghc-pkg, as there's
76 # no library to register
79 $(CABAL) configure --distpref dist-stage2 \
80 $(CONFIGURE_FLAGS_STAGE2) \
81 $(INSTALL_DIRS_CONFIGURE_FLAGS) \
82 $(USE_STAGE1_CONFIGURE_FLAGS) \
83 $(COMMON_CONFIGURE_FLAGS)
84 $(CABAL) build --distpref dist-stage2 $(BUILD_FLAGS)
85 $(INSTALL_PACKAGE) install '$(GHC_PKG_PROG)' 'XXX/package.conf' "" \
86 $(FPTOOLS_TOP_ABS)/ghc/stage2-inplace \
87 $(FPTOOLS_TOP_ABS)/ghc/stage2-inplace \
96 --distpref dist-stage2 \
101 # $(INSTALL_DIR) $(BIN_DIST_DIR)/utils/hsc2hs
102 # $(INSTALL_DATA) Makefile $(BIN_DIST_DIR)/utils/hsc2hs/
103 # $(INSTALL_DATA) hsc2hs.sh $(BIN_DIST_DIR)/utils/hsc2hs/
104 # $(INSTALL_DATA) $(INSTALL_DATAS) $(BIN_DIST_DIR)/utils/hsc2hs/
105 # $(INSTALL_PROGRAM) $(HS_PROG) $(BIN_DIST_DIR)/utils/hsc2hs/