Make versioned ghc and ghci programs on Windows; fixes trac #2827
[ghc-hetmet.git] / driver / ghc / Makefile
1 TOP=../..
2 include $(TOP)/mk/boilerplate.mk
3
4 ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
5 C_PROG = ghc-$(ProjectVersion)
6 INSTALL_PROGS += $(C_PROG)
7 else
8 SCRIPT_DIR = $(DESTDIR)$(bindir)
9 SCRIPT_BASE = ghc
10 SCRIPT_VERSIONED_BASE = $(SCRIPT_BASE)-$(ProjectVersion)
11 SCRIPT           = $(SCRIPT_DIR)/$(SCRIPT_BASE)
12 SCRIPT_VERSIONED = $(SCRIPT_DIR)/$(SCRIPT_VERSIONED_BASE)
13
14 install::
15         mv $(SCRIPT) $(SCRIPT_VERSIONED)
16         ln -s $(SCRIPT_VERSIONED_BASE) $(SCRIPT)
17 endif
18
19 include $(TOP)/mk/bindist.mk
20
21 include $(TOP)/mk/target.mk