3 include $(TOP)/mk/boilerplate.mk
4 include $(TOP)/mk/cabal-flags.mk
8 ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
11 INSTALL_FLAGS = --enable-shell-wrappers
14 default all: with-bootstrapping-compiler
16 with-bootstrapping-compiler: Version.hs
17 $(CABAL) configure --distpref dist-inplace \
18 $(INPLACE_DIRS_CONFIGURE_FLAGS) \
19 $(USE_BOOT_CONFIGURE_FLAGS) \
20 $(COMMON_CONFIGURE_FLAGS)
21 $(CABAL) build --distpref dist-inplace $(BUILD_FLAGS)
22 $(CABAL) install --distpref dist-inplace $(INSTALL_FLAGS)
24 with-stage-1: Version.hs
25 $(CABAL) configure --distpref dist-install \
26 $(INSTALL_DIRS_CONFIGURE_FLAGS) \
27 $(USE_STAGE1_CONFIGURE_FLAGS) \
28 $(COMMON_CONFIGURE_FLAGS)
29 $(CABAL) build --distpref dist-install $(BUILD_FLAGS)
32 $(INSTALL_PACKAGE) install UNUSED UNUSED '$(DESTDIR)' '$(prefix)' \
33 '$(prefix)' '$(bindir)' '$(libdir)' \
34 '$(libexecdir)' '$(dynlibdir)' '$(datadir)' \
35 '$(docdir)' '$(htmldir)' '$(haddockdir)'
36 --distpref dist-install \
42 -$(CABAL) clean --distpref dist-inplace
43 -$(CABAL) clean --distpref dist-install
48 ##### Here down is unique to ghc-pkg
50 Version.hs: Makefile $(TOP)/mk/config.mk
52 echo "module Version where" >> Version.hs
53 echo "version, targetOS, targetARCH :: String" >> Version.hs
54 echo "version = \"$(ProjectVersion)\"" >> Version.hs
55 echo "targetOS = \"$(TargetOS_CPP)\"" >> Version.hs
56 echo "targetARCH = \"$(TargetArch_CPP)\"" >> Version.hs