2 include $(TOP)/mk/cabal-flags.mk
4 # XXX We would like to turn this on, but Cabal generates paths files
5 # that are not -Wall clean!
8 ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
11 ifeq "$(ENABLE_SHELL_WRAPPERS)" "YES"
12 INSTALL_FLAGS = --enable-shell-wrappers
18 # Tell stage1 to make a dynamically-linked binary, but no wrapper. We assume
19 # that in an installation the shared libs will be installed somewhere that
20 # the system can find them.
21 ifeq "$(BuildSharedLibs)" "YES"
22 DYN_FLAGS = --ghc-option=-dynamic --ghc-option=-dynload --ghc-option=deploy
25 .PHONY: default all with-bootstrapping-compiler with-stage-1 clean distclean
27 default all: with-bootstrapping-compiler
29 with-bootstrapping-compiler:
30 $(CABAL) configure --distpref dist-inplace \
31 $(INPLACE_DIRS_CONFIGURE_FLAGS) \
32 $(USE_BOOT_CONFIGURE_FLAGS) \
33 $(COMMON_CONFIGURE_FLAGS) \
34 $(EXTRA_INPLACE_CONFIGURE_FLAGS)
35 $(CABAL) build --distpref dist-inplace $(BUILD_FLAGS)
36 $(CABAL) install --distpref dist-inplace $(INSTALL_FLAGS)
39 $(CABAL) configure --distpref dist-install \
40 $(INSTALL_DIRS_CONFIGURE_FLAGS) \
41 $(USE_STAGE1_CONFIGURE_FLAGS) \
42 $(COMMON_CONFIGURE_FLAGS) \
43 $(EXTRA_STAGE1_CONFIGURE_FLAGS)
44 $(CABAL) build --distpref dist-install $(DYN_FLAGS) $(BUILD_FLAGS)
47 $(INSTALL_PACKAGE) install UNUSED UNUSED '$(DESTDIR)' '$(prefix)' \
48 '$(prefix)' '$(bindir)' '$(libdir)' \
49 '$(libexecdir)' '$(dynlibdir)' '$(datadir)' \
50 '$(docdir)' '$(htmldir)' '$(haddockdir)' \
51 --distpref dist-install \
57 -$(CABAL) clean --distpref dist-inplace
58 -$(CABAL) clean --distpref dist-install
59 ifneq "$(EXTRA_CLEAN)" ""
60 $(RM) -f $(EXTRA_CLEAN)