Commit ec735cae authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Don't use TOP_ABS in Makefile rules

The : in c:/foo/bar on Windows confuses make.
parent c41b9a84
...@@ -120,6 +120,9 @@ ifeq "$(AR)" "" ...@@ -120,6 +120,9 @@ ifeq "$(AR)" ""
AR = ar AR = ar
endif endif
# Be careful when using this. On Windows it ends up looking like
# c:/foo/bar which confuses make, as make thinks that the : is Makefile
# syntax
TOP_ABS := $(abspath $(TOP)) TOP_ABS := $(abspath $(TOP))
$(eval $(call canonicalise,TOP_ABS)) $(eval $(call canonicalise,TOP_ABS))
...@@ -135,15 +138,15 @@ PYTHON = python ...@@ -135,15 +138,15 @@ PYTHON = python
# the results, and emits a little .mk file with make bindings for the values. # the results, and emits a little .mk file with make bindings for the values.
# This way we cache the results for different values of $(TEST_HC) # This way we cache the results for different values of $(TEST_HC)
$(TOP_ABS)/mk/ghc-config : $(TOP_ABS)/mk/ghc-config.hs $(TOP)/mk/ghc-config : $(TOP)/mk/ghc-config.hs
"$(TEST_HC)" --make -o $@ $< "$(TEST_HC)" --make -o $@ $<
empty= empty=
space=$(empty) $(empty) space=$(empty) $(empty)
ghc-config-mk = $(TOP_ABS)/mk/ghcconfig$(subst $(space),_,$(subst /,_,$(subst \,_,$(TEST_HC)))).mk ghc-config-mk = $(TOP)/mk/ghcconfig$(subst $(space),_,$(subst /,_,$(subst \,_,$(TEST_HC)))).mk
$(ghc-config-mk) : $(TOP_ABS)/mk/ghc-config $(ghc-config-mk) : $(TOP)/mk/ghc-config
$(TOP_ABS)/mk/ghc-config "$(TEST_HC)" >"$@" || $(RM) "$@" $(TOP)/mk/ghc-config "$(TEST_HC)" >"$@" || $(RM) "$@"
include $(ghc-config-mk) include $(ghc-config-mk)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment