[commit: ghc] master: add $(CrossCompilePrefix) to hp2ps (#7639) (b0fad0c)
ggreif at gmail.com
Mon Feb 4 12:52:58 CET 2013
Hi Simon, all,
here is me my new patch:
$ git show 95303e2b96f0630a051544b216cf4530d37dbaba
Author: Gabor Greif <ggreif at gmail.com>
Date: Fri Nov 23 17:54:00 2012 +0100
Allow different customizations per cross target
by obtaining CrossCompilePrefix from mk/config.mk and
using that to include mk/$(CrossCompilePrefix)build.mk
instead of mk/build.mk when present.
diff --git a/mk/custom-settings.mk b/mk/custom-settings.mk
index e64bb36..8de3450 100644
@@ -5,7 +5,8 @@ ifeq "$(Validating)" "YES"
+CrossCompilePrefix := $(word 3,$(shell grep -e "^CrossCompilePrefix
*= " mk/config.mk))
+-include $(firstword $(wildcard mk/$(CrossCompilePrefix)build.mk) mk/build.mk)
ifeq "$(BINDIST)" "YES"
This solution falls back to using mk/build.mk when building a cross compiler and
mk/<my-cross-target>-build.mk is not present. A slight complication is that when
mk/custom-settings.mk (the above file) get included from Makefile the
is not included (it gets read from the recursive make invocation by
I simply fish for CrossCompilePrefix with a grep line, but nothing bad
it is not found.
Okay to commit? Improvement suggestions? I'll add some lines of documentation if
you think this is good to go.
More information about the ghc-devs