[commit: ghc] master: Use different exeext variables for each stage; fixes #7709 (d65a61d)

Ian Lynagh igloo at earth.li
Sat Apr 20 22:36:10 CEST 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : master

https://github.com/ghc/ghc/commit/d65a61dfa99e613a3f16b85e592b1e35270d4098

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

commit d65a61dfa99e613a3f16b85e592b1e35270d4098
Author: Ian Lynagh <ian at well-typed.com>
Date:   Sat Apr 20 18:51:18 2013 +0100

    Use different exeext variables for each stage; fixes #7709
    
    Currently they are all set to the same value, but when cross-compiling
    they could be set to different values.

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

 driver/ghci/ghc.mk     | 2 +-
 mk/project.mk.in       | 5 ++++-
 rules/build-prog.mk    | 2 +-
 utils/ghc-cabal/ghc.mk | 5 +++--
 utils/runghc/ghc.mk    | 2 +-
 5 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/driver/ghci/ghc.mk b/driver/ghci/ghc.mk
index 736b7a9..bd4bf36 100644
--- a/driver/ghci/ghc.mk
+++ b/driver/ghci/ghc.mk
@@ -38,7 +38,7 @@ driver/ghci_dist_OTHER_OBJS = driver/ghci/ghci.res
 
 $(eval $(call build-prog,driver/ghci,dist,1))
 
-driver/ghci_dist_PROG_VER = ghci-$(ProjectVersion)$(exeext)
+driver/ghci_dist_PROG_VER = ghci-$(ProjectVersion)$(exeext1)
 
 INSTALL_BINS += driver/ghci/dist/build/tmp/$(driver/ghci_dist_PROG_VER)
 
diff --git a/mk/project.mk.in b/mk/project.mk.in
index e47663f..004e9b1 100644
--- a/mk/project.mk.in
+++ b/mk/project.mk.in
@@ -125,7 +125,10 @@ BuildVendor_CPP                 = @BuildVendor_CPP@
 LeadingUnderscore=@LeadingUnderscore@
 
 # Pin a suffix on executables? If so, what (Windows only).
-exeext=@exeext@
+exeext0=@exeext@
+exeext1=@exeext@
+exeext2=@exeext@
+exeext3=@exeext@
 soext=@soext@
 
 # Windows_Host=YES if on a Windows platform
diff --git a/rules/build-prog.mk b/rules/build-prog.mk
index b788bc1..0f4bb49 100644
--- a/rules/build-prog.mk
+++ b/rules/build-prog.mk
@@ -33,7 +33,7 @@ endif
 ifneq "$$($1_$2_PROG)" ""
 $$(error $1_$2_PROG is set)
 endif
-$1_$2_PROG = $$($1_$2_PROGNAME)$$(exeext)
+$1_$2_PROG = $$($1_$2_PROGNAME)$$(exeext$3)
 endif
 
 ifeq "$$(findstring $3,0 1 2)" ""
diff --git a/utils/ghc-cabal/ghc.mk b/utils/ghc-cabal/ghc.mk
index ecdef07..987c59c 100644
--- a/utils/ghc-cabal/ghc.mk
+++ b/utils/ghc-cabal/ghc.mk
@@ -18,8 +18,9 @@ CABAL_DOTTED_VERSION := $(shell grep "^version:" libraries/Cabal/Cabal/Cabal.cab
 CABAL_VERSION := $(subst .,$(comma),$(CABAL_DOTTED_VERSION))
 CABAL_CONSTRAINT := --constraint="Cabal == $(CABAL_DOTTED_VERSION)"
 
-ghc-cabal_DIST_BINARY = utils/ghc-cabal/dist/build/tmp/ghc-cabal$(exeext)
-ghc-cabal_INPLACE = inplace/bin/ghc-cabal$(exeext)
+ghc-cabal_DIST_BINARY_NAME = ghc-cabal$(exeext0)
+ghc-cabal_DIST_BINARY = utils/ghc-cabal/dist/build/tmp/$(ghc-cabal_DIST_BINARY_NAME)
+ghc-cabal_INPLACE = inplace/bin/ghc-cabal$(ghc-cabal_DIST_BINARY_NAME)
 
 ifneq "$(BINDIST)" "YES"
 $(ghc-cabal_INPLACE) : $(ghc-cabal_DIST_BINARY) | $$(dir $$@)/.
diff --git a/utils/runghc/ghc.mk b/utils/runghc/ghc.mk
index cde8102..5a56af5 100644
--- a/utils/runghc/ghc.mk
+++ b/utils/runghc/ghc.mk
@@ -32,7 +32,7 @@ install: install_runhaskell
 .PHONY: install_runhaskell
 ifeq "$(Windows_Host)" "YES"
 install_runhaskell: install_bins
-	"$(CP)" $(DESTDIR)$(bindir)/runghc$(exeext) $(DESTDIR)$(bindir)/runhaskell$(exeext)
+	"$(CP)" $(DESTDIR)$(bindir)/runghc$(exeext1) $(DESTDIR)$(bindir)/runhaskell$(exeext1)
 else
 install_runhaskell:
 	$(call removeFiles,"$(DESTDIR)$(bindir)/runhaskell")





More information about the ghc-commits mailing list