summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-08-17 17:50:22 +0000
committerBen Gamari <ben@smart-cactus.org>2022-08-17 17:50:22 +0000
commitd04c592df1643b1f3bdf1824a9c88887c054402e (patch)
treef236bfac9a0a8c85bd91d4d54bec5647dc9b34d9
parent4f70fbff761eab1db951e59921df4fa33ab83d13 (diff)
downloadhaskell-d04c592df1643b1f3bdf1824a9c88887c054402e.tar.gz
make: Fix bindist installation
-rw-r--r--ghc.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/ghc.mk b/ghc.mk
index b91af56078..d73f37a29c 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -135,10 +135,13 @@ include mk/config.mk
ifeq "$(ProjectVersion)" ""
$(error Please run ./configure first)
endif
+
+ifneq "$(BINDIST)" "YES"
ifneq "$(CanBootWithMake)" "YES"
$(error The make build system requires a boot compiler older than ghc-9.2. Your boot compiler is too new and cannot be used to build ghc-9.4 with make. Either boot with ghc 9.0.2 or build with hadrian. See https://www.haskell.org/ghc/blog/20220805-make-to-hadrian.html for advice on transitioning to hadrian.)
endif
endif
+endif
include mk/ways.mk
@@ -493,6 +496,8 @@ libraries/ghc-bignum_CONFIGURE_OPTS += -f $(BIGNUM_BACKEND)
CABAL_DEPS = text transformers mtl parsec Cabal/Cabal-syntax
CABAL_BOOT_DEPS = process array filepath base bytestring containers deepseq time unix pretty directory
+# N.B. This shouldn't be needed while installing a binary distribution.
+ifneq "$(BINDIST)" "YES"
BOOT_PKG_DEPS := \
$(foreach p,$(CABAL_BOOT_DEPS),\
--dependency="$p=$p-$(shell $(GHC_PKG) --simple-output field $p version)")
@@ -501,6 +506,7 @@ STAGE0_PKG_DEPS := \
$(foreach d,$(CABAL_DEPS),\
$(foreach p,$(basename $(notdir $(wildcard libraries/$d/*.cabal))),\
--dependency="$p=$p-$(shell grep -i "^Version:" libraries/$d/$p.cabal | sed "s/[^0-9.]//g")"))
+endif
libraries/Cabal/Cabal_dist-boot_CONFIGURE_OPTS += --exact-configuration $(BOOT_PKG_DEPS) $(STAGE0_PKG_DEPS)