fix (non-fast) validate
authorSimon Marlow <marlowsd@gmail.com>
Tue, 17 Jan 2012 12:25:28 +0000 (12:25 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Tue, 17 Jan 2012 12:36:55 +0000 (12:36 +0000)
testsuite/mk/boilerplate.mk

index 881e8d7..dd5be68 100644 (file)
@@ -138,10 +138,12 @@ PYTHON = python
 $(TOP_ABS)/mk/ghc-config : $(TOP_ABS)/mk/ghc-config.hs
        "$(TEST_HC)" --make -o $@ $<
 
-ghc-config-mk = $(TOP_ABS)/mk/ghcconfig$(subst /,_,$(subst \,_,$(TEST_HC))).mk
+empty=
+space=$(empty) $(empty)
+ghc-config-mk = $(TOP_ABS)/mk/ghcconfig$(subst $(space),_,$(subst /,_,$(subst \,_,$(TEST_HC)))).mk
 
 $(ghc-config-mk) : $(TOP_ABS)/mk/ghc-config
-       $(TOP_ABS)/mk/ghc-config $(TEST_HC) >$@
+       $(TOP_ABS)/mk/ghc-config "$(TEST_HC)" >"$@" || $(RM) "$@"
 
 include $(ghc-config-mk)