[commit: ghc] master: Allow different customizations per cross target (b2a9fbf)

Gabor Greif ggreif at gmail.com
Fri Feb 15 10:07:28 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/b2a9fbfe38e5c18f367d020c36c45a1b10038149

>---------------------------------------------------------------

commit b2a9fbfe38e5c18f367d020c36c45a1b10038149
Author: Gabor Greif <ggreif at gmail.com>
Date:   Fri Nov 23 17:54:00 2012 +0100

    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).

>---------------------------------------------------------------

 mk/config.mk.in       |    1 +
 mk/custom-settings.mk |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/mk/config.mk.in b/mk/config.mk.in
index 987ee32..0fc3a1d 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 e64bb36..e5e564c 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"





More information about the ghc-commits mailing list