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-haddock=$(HADDOCK)
37 COMMON_CONFIGURE_FLAGS += --with-happy=$(HAPPY)
40 COMMON_CONFIGURE_FLAGS += $(FLAGGED_CONFIGURE_ARGS) \
41 --configure-option=--with-cc=$(CC)
43 COMMON_CONFIGURE_FLAGS += $(shell [ -e $(HSC2HS_INPLACE) ] && \
44 echo --with-hsc2hs=$(HSC2HS_INPLACE) )
46 ifeq "$(Windows)" "YES"
47 NONEXISTENT=c:/NONEXISTENT
49 NONEXISTENT=/NONEXISTENT
52 # We put non-existant paths in when configuring things that we plan to
53 # install, as we require that builds don't depend on these paths when
55 INSTALL_DIRS_CONFIGURE_FLAGS = \
56 --prefix=$(NONEXISTENT) \
57 --bindir=$(NONEXISTENT) \
58 --libdir=$(NONEXISTENT) \
59 --libexecdir=$(NONEXISTENT) \
60 --datadir=$(NONEXISTENT) \
61 --docdir=$(NONEXISTENT) \
62 --haddockdir=$(NONEXISTENT) \
63 --htmldir=$(NONEXISTENT)
65 INPLACE_GHC_DATADIR_CONFIGURE_FLAGS = \
66 --datadir=$(FPTOOLS_TOP_ABS)/inplace-datadir \
69 INPLACE_DIRS_CONFIGURE_FLAGS = \
70 --prefix=`$(FPTOOLS_TOP_ABS)/utils/pwd/pwd forwardslash`/install-inplace
72 USE_BOOT_CONFIGURE_FLAGS = \
73 --with-compiler=$(GHC) \
74 --with-hc-pkg=$(GHC_PKG) \
75 --package-db $(FPTOOLS_TOP_ABS)/libraries/bootstrapping.conf
77 USE_STAGE_CONFIGURE_FLAGS = \
78 --with-hc-pkg=$(GHC_PKG_INPLACE) \
79 $(addprefix --cc-option=,$(MACOSX_DEPLOYMENT_CC_OPTS)) \
80 $(addprefix --ld-option=,$(MACOSX_DEPLOYMENT_LD_OPTS))
82 USE_STAGE1_CONFIGURE_FLAGS = \
83 --with-compiler=$(GHC_STAGE1) \
84 $(USE_STAGE_CONFIGURE_FLAGS)
86 USE_STAGE2_CONFIGURE_FLAGS = \
87 --with-compiler=$(GHC_STAGE2) \
88 $(USE_STAGE_CONFIGURE_FLAGS) \
89 --package-db $(STAGE3_PACKAGE_CONF)
91 BUILD_FLAGS = $(addprefix --ghc-option=,$(SRC_HC_OPTS))