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