2 include $(TOP)/mk/cabal-flags.mk
3 include $(TOP)/mk/bindist.mk
7 ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
10 ifeq "$(ENABLE_SHELL_WRAPPERS)" "YES"
11 INSTALL_FLAGS = --enable-shell-wrappers
17 # Tell stage2 to make a dynamically-linked binary, but no wrapper. We assume
18 # that in an installation the shared libs will be installed somewhere that
19 # the system can find them.
20 ifeq "$(BuildSharedLibs)" "YES"
21 DYN_FLAGS = --ghc-option=-dynamic --ghc-option=-dynload --ghc-option=deploy
24 .PHONY: default all with-bootstrapping-compiler with-stage-2 clean distclean
26 default all: with-bootstrapping-compiler
28 with-bootstrapping-compiler:
29 $(CABAL) configure --distpref dist-inplace \
30 $(INPLACE_DIRS_CONFIGURE_FLAGS) \
31 $(USE_BOOT_CONFIGURE_FLAGS) \
32 $(COMMON_CONFIGURE_FLAGS) \
33 $(EXTRA_INPLACE_CONFIGURE_FLAGS)
34 $(CABAL) build --distpref dist-inplace $(BUILD_FLAGS)
35 $(CABAL) install --distpref dist-inplace $(INSTALL_FLAGS)
38 $(CABAL) configure --distpref dist-install \
39 $(INSTALL_DIRS_CONFIGURE_FLAGS) \
40 $(USE_STAGE2_CONFIGURE_FLAGS) \
41 $(COMMON_CONFIGURE_FLAGS) \
42 $(EXTRA_STAGE2_CONFIGURE_FLAGS)
43 $(CABAL) build --distpref dist-install $(DYN_FLAGS) $(BUILD_FLAGS)
46 $(INSTALL_PACKAGE) install \
47 '$(GHC_PKG_INSTALL_PROG)' \
48 '$(DESTDIR)$(datadir)/package.conf' \
49 '$(DESTDIR)' '$(prefix)' \
50 '$(prefix)' '$(bindir)' '$(libdir)' \
51 '$(libexecdir)' '$(dynlibdir)' '$(datadir)' \
52 '$(docdir)' '$(htmldir)' '$(haddockdir)' \
53 --distpref dist-install \
57 -$(CABAL) clean --distpref dist-inplace
58 -$(CABAL) clean --distpref dist-install
59 $(RM) -rf install-inplace
60 ifneq "$(EXTRA_CLEAN)" ""
61 $(RM) -f $(EXTRA_CLEAN)
65 ifneq "$(EXTRA_DISTCLEAN)" ""
66 $(RM) -f $(EXTRA_DISTCLEAN)