include $(TOP)/mk/boilerplate.mk
ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
-C_PROG = ghc-$(ProjectVersion)
+C_PROG = ghc-$(ProjectVersion)$(exeext)
INSTALL_PROGS += $(C_PROG)
else
SCRIPT_DIR = $(DESTDIR)$(bindir)
# ghci script
ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
-C_PROG = ghci
-C_PROG_VERSIONED = $(C_PROG)-$(ProjectVersion)
+C_PROG = ghci$(exeext)
+C_PROG_VERSIONED = ghci-$(ProjectVersion)$(exeext)
C_OBJS += ghci.res
all :: $(C_PROG_VERSIONED)
# entry in the INSTALL_PROGS list. If there's no suffix, use
# $(exeext).
#
-INSTALL_PROGS := $(foreach p, $(INSTALL_PROGS), $(addsuffix $(if $(suffix $(p)),,$(exeext)), $(basename $(p))))
+INSTALL_PROGS := $(foreach p, $(INSTALL_PROGS),\
+ $(if $(filter $(exeext),$(suffix $p)),\
+ $p,\
+ $(addsuffix $(exeext),$p)\
+ )\
+ )
install:: $(INSTALL_PROGS)
$(INSTALL_DIR) $(DESTDIR)$(bindir)