summaryrefslogtreecommitdiff
path: root/driver/ghci
diff options
context:
space:
mode:
Diffstat (limited to 'driver/ghci')
-rw-r--r--driver/ghci/Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/driver/ghci/Makefile b/driver/ghci/Makefile
index 54bd246623..8bb25383ef 100644
--- a/driver/ghci/Makefile
+++ b/driver/ghci/Makefile
@@ -10,19 +10,27 @@ include $(TOP)/mk/boilerplate.mk
ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
C_PROG = ghci
+C_PROG_VERSIONED = $(C_PROG)-$(ProjectVersion)
C_OBJS += ghci.res
+
+all :: $(C_PROG_VERSIONED)
+$(C_PROG_VERSIONED) : $(C_PROG)
+ cp $< $@
else
C_SRCS=
endif
ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
-INSTALL_PROGS += $(C_PROG)
+INSTALL_PROGS += $(C_PROG) $(C_PROG_VERSIONED)
GHCII_SCRIPT=$(DESTDIR)$(bindir)/ghcii.sh
+GHCII_SCRIPT_VERSIONED = $(DESTDIR)$(bindir)/ghcii-$(ProjectVersion).sh
install::
$(RM) -f $(GHCII_SCRIPT)
echo "#!$(SHELL)" >> $(GHCII_SCRIPT)
echo 'exec "$$0"/../ghc --interactive $${1+"$$@"}' >> $(GHCII_SCRIPT)
chmod +x $(GHCII_SCRIPT)
+ cp $(GHCII_SCRIPT) $(GHCII_SCRIPT_VERSIONED)
+ chmod +x $(GHCII_SCRIPT_VERSIONED)
else
LINK = ghci
LINK_TARGET = $(LINK)-$(ProjectVersion)