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 stage1 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-1 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_STAGE1_CONFIGURE_FLAGS) \
41 $(COMMON_CONFIGURE_FLAGS) \
42 $(EXTRA_STAGE1_CONFIGURE_FLAGS)
43 $(CABAL) build --distpref dist-install $(DYN_FLAGS) $(BUILD_FLAGS)
46 $(INSTALL_PACKAGE) install UNUSED UNUSED '$(DESTDIR)' '$(prefix)' \
47 '$(prefix)' '$(bindir)' '$(libdir)' \
48 '$(libexecdir)' '$(dynlibdir)' '$(datadir)' \
49 '$(docdir)' '$(htmldir)' '$(haddockdir)' \
50 --distpref dist-install \
54 -$(CABAL) clean --distpref dist-inplace
55 -$(CABAL) clean --distpref dist-install
56 ifneq "$(EXTRA_CLEAN)" ""
57 $(RM) -f $(EXTRA_CLEAN)
61 ifneq "$(EXTRA_DISTCLEAN)" ""
62 $(RM) -f $(EXTRA_DISTCLEAN)