From ba0aed2e783435c9175761fc2b20b9302f368a98 Mon Sep 17 00:00:00 2001 From: Alp Mestanogullari Date: Tue, 23 Apr 2019 14:46:42 +0200 Subject: 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 '/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. --- testsuite/mk/boilerplate.mk | 2 ++ 1 file changed, 2 insertions(+) (limited to 'testsuite/mk') 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))" "" -- cgit v1.2.1