summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2012-11-23 17:54:00 +0100
committerGabor Greif <ggreif@gmail.com>2013-02-15 10:06:36 +0100
commitb2a9fbfe38e5c18f367d020c36c45a1b10038149 (patch)
tree140a6a2b4de156e9ff34ccdb16f658237e9b7b78
parent16389d13d252a7a173095478dd3a393b3f69b475 (diff)
downloadhaskell-b2a9fbfe38e5c18f367d020c36c45a1b10038149.tar.gz
Allow different customizations per cross target
by obtaining GlobalCrossCompilePrefix from mk/config.mk and using that to include mk/$(GlobalCrossCompilePrefix)build.mk instead of mk/build.mk when present. Note: GlobalCrossCompilePrefix is basically the same as CrossCompilePrefix, but does not depend on $(phase).
-rw-r--r--mk/config.mk.in1
-rw-r--r--mk/custom-settings.mk2
2 files changed, 2 insertions, 1 deletions
diff --git a/mk/config.mk.in b/mk/config.mk.in
index 987ee32808..0fc3a1da8a 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -571,6 +571,7 @@ GHC_PACKAGE_DB_FLAG = @GHC_PACKAGE_DB_FLAG@
WhatGccIsCalled = @WhatGccIsCalled@
GccVersion = @GccVersion@
+GlobalCrossCompilePrefix = @CrossCompilePrefix@
ifeq "$(phase)" "0"
CrossCompilePrefix =
else
diff --git a/mk/custom-settings.mk b/mk/custom-settings.mk
index e64bb36561..e5e564ca00 100644
--- a/mk/custom-settings.mk
+++ b/mk/custom-settings.mk
@@ -5,7 +5,7 @@ ifeq "$(Validating)" "YES"
include mk/validate-settings.mk
-include mk/validate.mk
else
--include mk/build.mk
+-include $(firstword $(wildcard mk/$(GlobalCrossCompilePrefix)build.mk) mk/build.mk)
endif
ifeq "$(BINDIST)" "YES"