summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--driver/ghci/ghc.mk2
-rw-r--r--mk/project.mk.in5
-rw-r--r--rules/build-prog.mk2
-rw-r--r--utils/ghc-cabal/ghc.mk5
-rw-r--r--utils/runghc/ghc.mk2
5 files changed, 10 insertions, 6 deletions
diff --git a/driver/ghci/ghc.mk b/driver/ghci/ghc.mk
index 736b7a927d..bd4bf36117 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 e47663fcdb..004e9b1c15 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 b788bc15b4..0f4bb49489 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 ecdef07d1f..987c59ce50 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 cde8102312..5a56af5a49 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")