summaryrefslogtreecommitdiff
path: root/testsuite/mk
diff options
context:
space:
mode:
authorAlp Mestanogullari <alpmestan@gmail.com>2019-04-23 14:46:42 +0200
committerAlp Mestanogullari <alp@well-typed.com>2019-05-06 17:32:56 -0400
commitba0aed2e783435c9175761fc2b20b9302f368a98 (patch)
tree3a3fd1b976c8ec4535b97b15f71b8ddc64415c5d /testsuite/mk
parente172a6d127a65b945b31306ff7b6c43320debfb4 (diff)
downloadhaskell-ba0aed2e783435c9175761fc2b20b9302f368a98.tar.gz
Hadrian: override $(ghc-config-mk), to prevent redundant config generation
This required making the 'ghc-config-mk' variable overridable in testsuite/mk/boilerplate.mk, and then making use of this in hadrian to point to '<build root>/test/ghcconfig' instead, which is where we always put the test config. Previously, we would build ghc-config and run it against the GHC to be tested, a second time, while we're running the tests, because some include testsuite/mk/boilerplate.mk. This was causing unexpected output failures.
Diffstat (limited to 'testsuite/mk')
-rw-r--r--testsuite/mk/boilerplate.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/testsuite/mk/boilerplate.mk b/testsuite/mk/boilerplate.mk
index 4c32f30ee2..3dc84f02e0 100644
--- a/testsuite/mk/boilerplate.mk
+++ b/testsuite/mk/boilerplate.mk
@@ -240,11 +240,13 @@ $(TOP)/mk/ghc-config : $(TOP)/mk/ghc-config.hs
empty=
space=$(empty) $(empty)
+ifeq "$(ghc-config-mk)" ""
ghc-config-mk = $(TOP)/mk/ghcconfig$(subst $(space),_,$(subst :,_,$(subst /,_,$(subst \,_,$(TEST_HC))))).mk
$(ghc-config-mk) : $(TOP)/mk/ghc-config
$(TOP)/mk/ghc-config "$(TEST_HC)" >"$@"; if [ $$? != 0 ]; then $(RM) "$@"; exit 1; fi
# If the ghc-config fails, remove $@, and fail
+endif
# Note: $(CLEANING) is not defined in the testsuite.
ifeq "$(findstring clean,$(MAKECMDGOALS))" ""