3 space=$(nothing) $(nothing)
5 LIBRARIES_ABS = $(FPTOOLS_TOP_ABS)/libraries
6 UTILS_ABS = $(FPTOOLS_TOP_ABS)/utils
7 CABAL = $(LIBRARIES_ABS)/cabal-bin $(GHC) $(LIBRARIES_ABS)/bootstrapping.conf
9 $(UTILS_ABS)/installPackage/install-inplace/bin/installPackage
10 STAGE3_PACKAGE_CONF = $(FPTOOLS_TOP_ABS)/stage3.package.conf
12 # We rely on all the CONFIGURE_ARGS being quoted with '...', and there
13 # being no 's inside the values.
14 FLAGGED_CONFIGURE_ARGS = $(subst $(space)',\
15 $(space)--configure-option=',\
16 $(space)$(CONFIGURE_ARGS))
18 COMMON_CONFIGURE_FLAGS = \
19 --libsubdir='$$pkgid' \
21 $(addprefix --hsc2hs-option=,$(SRC_HSC2HS_OPTS))
23 ifneq "$(HSCOLOUR)" ""
24 COMMON_CONFIGURE_FLAGS += --with-hscolour=$(HSCOLOUR)
28 COMMON_CONFIGURE_FLAGS += --with-alex=$(ALEX)
32 COMMON_CONFIGURE_FLAGS += --with-haddock=$(HADDOCK)
36 COMMON_CONFIGURE_FLAGS += --with-happy=$(HAPPY)
39 COMMON_CONFIGURE_FLAGS += $(FLAGGED_CONFIGURE_ARGS) \
40 --configure-option=--with-cc=$(CC)
42 COMMON_CONFIGURE_FLAGS += $(shell [ -e $(HSC2HS_INPLACE) ] && \
43 echo --with-hsc2hs=$(HSC2HS_INPLACE) )
45 ifeq "$(Windows)" "YES"
46 NONEXISTENT=c:/NONEXISTENT
48 NONEXISTENT=/NONEXISTENT
51 # We put non-existant paths in when configuring things that we plan to
52 # install, as we require that builds don't depend on these paths when
54 INSTALL_DIRS_CONFIGURE_FLAGS = \
55 --prefix=$(NONEXISTENT) \
56 --bindir=$(NONEXISTENT) \
57 --libdir=$(NONEXISTENT) \
58 --libexecdir=$(NONEXISTENT) \
59 --datadir=$(NONEXISTENT) \
60 --docdir=$(NONEXISTENT) \
61 --haddockdir=$(NONEXISTENT) \
62 --htmldir=$(NONEXISTENT)
64 INPLACE_GHC_DATADIR_CONFIGURE_FLAGS = \
65 --datadir=$(FPTOOLS_TOP_ABS)/inplace-datadir \
68 INPLACE_DIRS_CONFIGURE_FLAGS = \
69 --prefix=`$(FPTOOLS_TOP_ABS)/utils/pwd/pwd forwardslash`/install-inplace
71 USE_BOOT_CONFIGURE_FLAGS = \
72 --with-compiler=$(GHC) \
73 --with-hc-pkg=$(GHC_PKG) \
74 --package-db $(FPTOOLS_TOP_ABS)/libraries/bootstrapping.conf
76 USE_STAGE_CONFIGURE_FLAGS = \
77 --with-hc-pkg=$(GHC_PKG_INPLACE) \
78 $(addprefix --cc-option=,$(MACOSX_DEPLOYMENT_CC_OPTS)) \
79 $(addprefix --ld-option=,$(MACOSX_DEPLOYMENT_LD_OPTS))
81 USE_STAGE1_CONFIGURE_FLAGS = \
82 --with-compiler=$(GHC_STAGE1) \
83 $(USE_STAGE_CONFIGURE_FLAGS)
85 USE_STAGE2_CONFIGURE_FLAGS = \
86 --with-compiler=$(GHC_STAGE2) \
87 $(USE_STAGE_CONFIGURE_FLAGS) \
88 --package-db $(STAGE3_PACKAGE_CONF)
90 BUILD_FLAGS = $(addprefix --ghc-option=,$(SRC_HC_OPTS))