Commit d65a61df authored by ian@well-typed.com's avatar ian@well-typed.com
Browse files

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.
parent c91c2330
......@@ -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)
......
......@@ -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
......
......@@ -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)" ""
......
......@@ -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 $$@)/.
......
......@@ -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")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment