3 include $(TOP)/mk/boilerplate.mk
4 include $(TOP)/mk/cabal-flags.mk
8 # XXX From old Makefile:
9 # SRC_HC_OPTS += -cpp -Wall -fno-warn-name-shadowing -fno-warn-unused-matches
11 ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
14 INSTALL_FLAGS = --enable-shell-wrappers
17 default all: with-bootstrapping-compiler
19 with-bootstrapping-compiler: Version.hs
20 $(CABAL) configure --distpref dist-inplace \
21 $(INPLACE_DIRS_CONFIGURE_FLAGS) \
22 $(USE_BOOT_CONFIGURE_FLAGS) \
23 $(COMMON_CONFIGURE_FLAGS)
24 $(CABAL) build --distpref dist-inplace $(BUILD_FLAGS)
25 $(CABAL) install --distpref dist-inplace $(INSTALL_FLAGS)
27 with-stage-1: Version.hs
28 $(CABAL) configure --distpref dist-install \
29 $(INSTALL_DIRS_CONFIGURE_FLAGS) \
30 $(USE_STAGE1_CONFIGURE_FLAGS) \
31 $(COMMON_CONFIGURE_FLAGS)
32 $(CABAL) build --distpref dist-install $(BUILD_FLAGS)
35 $(INSTALL_PACKAGE) install UNUSED UNUSED '$(DESTDIR)' '$(prefix)' \
36 '$(prefix)' '$(bindir)' '$(libdir)' \
37 '$(libexecdir)' '$(dynlibdir)' '$(datadir)' \
38 '$(docdir)' '$(htmldir)' '$(haddockdir)'
39 --distpref dist-install \
45 -$(CABAL) clean --distpref dist-inplace
46 -$(CABAL) clean --distpref dist-install
51 ##### Here down is unique to ghc-pkg
53 Version.hs: Makefile $(TOP)/mk/config.mk
55 echo "module Version where" >> Version.hs
56 echo "version, targetOS, targetARCH :: String" >> Version.hs
57 echo "version = \"$(ProjectVersion)\"" >> Version.hs
58 echo "targetOS = \"$(TargetOS_CPP)\"" >> Version.hs
59 echo "targetARCH = \"$(TargetArch_CPP)\"" >> Version.hs