nothing=
space=$(nothing) $(nothing)
+comma=,
GHC_PKG_INSTALL_PROG = $(FPTOOLS_TOP_ABS)/utils/ghc-pkg/dist-install/build/ghc-pkg/ghc-pkg
$(UTILS_ABS)/installPackage/install-inplace/bin/installPackage
STAGE3_PACKAGE_CONF = $(FPTOOLS_TOP_ABS)/stage3.package.conf
+# Euch, hideous hack:
+CABAL_DOTTED_VERSION = $(shell grep "^Version:" $(LIBRARIES_ABS)/Cabal/Cabal.cabal | sed "s/^Version: //")
+CABAL_VERSION = $(subst .,$(comma),$(CABAL_DOTTED_VERSION))
+CABAL_CONSTRAINT = --constraint="Cabal == $(CABAL_DOTTED_VERSION)"
+
# We rely on all the CONFIGURE_ARGS being quoted with '...', and there
# being no 's inside the values.
FLAGGED_CONFIGURE_ARGS = $(subst $(space)',\
COMMON_CONFIGURE_FLAGS += $(FLAGGED_CONFIGURE_ARGS) \
--configure-option=--with-cc=$(CC)
-COMMON_CONFIGURE_FLAGS += $(shell [ -e $(HSC2HS_INPLACE) ] && \
+COMMON_CONFIGURE_FLAGS += $(shell [ -f $(HSC2HS_INPLACE) ] && \
echo --with-hsc2hs=$(HSC2HS_INPLACE) )
ifeq "$(Windows)" "YES"