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' \
20 --with-gcc=$(WhatGccIsCalled) \
22 $(addprefix --hsc2hs-option=,$(SRC_HSC2HS_OPTS))
24 ifneq "$(HSCOLOUR)" ""
25 COMMON_CONFIGURE_FLAGS += --with-hscolour=$(HSCOLOUR)
29 COMMON_CONFIGURE_FLAGS += --with-alex=$(ALEX)
33 COMMON_CONFIGURE_FLAGS += --with-happy=$(HAPPY)
36 COMMON_CONFIGURE_FLAGS += $(FLAGGED_CONFIGURE_ARGS) \
37 --configure-option=--with-cc=$(CC)
39 COMMON_CONFIGURE_FLAGS += $(shell [ -e $(HSC2HS_INPLACE) ] && \
40 echo --with-hsc2hs=$(HSC2HS_INPLACE) )
42 ifeq "$(Windows)" "YES"
43 NONEXISTENT=c:/NONEXISTENT
45 NONEXISTENT=/NONEXISTENT
48 # We put non-existant paths in when configuring things that we plan to
49 # install, as we require that builds don't depend on these paths when
51 INSTALL_DIRS_CONFIGURE_FLAGS = \
52 --prefix=$(NONEXISTENT) \
53 --bindir=$(NONEXISTENT) \
54 --libdir=$(NONEXISTENT) \
55 --libexecdir=$(NONEXISTENT) \
56 --datadir=$(NONEXISTENT) \
57 --docdir=$(NONEXISTENT) \
58 --haddockdir=$(NONEXISTENT) \
59 --htmldir=$(NONEXISTENT)
61 INPLACE_GHC_DATADIR_CONFIGURE_FLAGS = \
62 --datadir=$(FPTOOLS_TOP_ABS)/inplace-datadir \
65 INPLACE_DIRS_CONFIGURE_FLAGS = \
66 --prefix=`$(FPTOOLS_TOP_ABS)/utils/pwd/pwd forwardslash`/install-inplace
68 USE_BOOT_CONFIGURE_FLAGS = \
69 --with-compiler=$(GHC) \
70 --with-hc-pkg=$(GHC_PKG) \
71 --package-db $(FPTOOLS_TOP_ABS)/libraries/bootstrapping.conf
73 USE_STAGE_CONFIGURE_FLAGS = \
74 --with-hc-pkg=$(GHC_PKG_INPLACE) \
75 $(addprefix --cc-option=,$(MACOSX_DEPLOYMENT_CC_OPTS)) \
76 $(addprefix --ld-option=,$(MACOSX_DEPLOYMENT_LD_OPTS))
78 USE_STAGE1_CONFIGURE_FLAGS = \
79 --with-compiler=$(GHC_STAGE1) \
80 $(USE_STAGE_CONFIGURE_FLAGS)
82 USE_STAGE2_CONFIGURE_FLAGS = \
83 --with-compiler=$(GHC_STAGE2) \
84 $(USE_STAGE_CONFIGURE_FLAGS) \
85 --package-db $(STAGE3_PACKAGE_CONF)
87 BUILD_FLAGS = $(addprefix --ghc-option=,$(SRC_HC_OPTS))