summaryrefslogtreecommitdiff
path: root/ghc.mk
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-10-26 18:31:26 +0100
committerIan Lynagh <ian@well-typed.com>2012-10-26 18:31:26 +0100
commit84d527bb46d9c820ba4f52f4f28393d890575221 (patch)
treed5a9f46696a7c3438473a0cc06252ad17d3c83c7 /ghc.mk
parent26b2caf02f8999f115de72f0cfa7b39c93b17296 (diff)
downloadhaskell-84d527bb46d9c820ba4f52f4f28393d890575221.tar.gz
Improve the GhcLibWays sanity checking
Diffstat (limited to 'ghc.mk')
-rw-r--r--ghc.mk10
1 files changed, 8 insertions, 2 deletions
diff --git a/ghc.mk b/ghc.mk
index 8e530e25f5..13f0db23ed 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -129,8 +129,14 @@ include mk/ways.mk
include mk/custom-settings.mk
ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
-ifeq "$(GhcLibWays)" ""
-$(error $$(GhcLibWays) is empty, it must contain at least one way)
+ifeq "$(DYNAMIC_BY_DEFAULT)" "YES"
+ifeq "$(findstring dyn,$(GhcLibWays))" ""
+$(error dyn is not in $$(GhcLibWays), but $$(DYNAMIC_BY_DEFAULT) is YES)
+endif
+else
+ifeq "$(findstring v,$(GhcLibWays))" ""
+$(error v is not in $$(GhcLibWays), and $$(DYNAMIC_BY_DEFAULT) is not YES)
+endif
endif
endif