diff options
author | Ian Lynagh <igloo@earth.li> | 2009-02-18 00:50:34 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2009-02-18 00:50:34 +0000 |
commit | 16a061076237d4b6a02d9f10f69075b14e889a72 (patch) | |
tree | be958396a929707328450cc7d089faf2894c72c3 | |
parent | 2719d1e57ba9524b3acdb2b270508704f6306137 (diff) | |
download | haskell-16a061076237d4b6a02d9f10f69075b14e889a72.tar.gz |
Fix ghc and ghci wrappers on Windows
-rw-r--r-- | driver/ghc/Makefile | 2 | ||||
-rw-r--r-- | driver/ghci/Makefile | 4 | ||||
-rw-r--r-- | mk/install.mk | 7 |
3 files changed, 9 insertions, 4 deletions
diff --git a/driver/ghc/Makefile b/driver/ghc/Makefile index 55167ecf9b..dcde9948c0 100644 --- a/driver/ghc/Makefile +++ b/driver/ghc/Makefile @@ -2,7 +2,7 @@ TOP=../.. 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) diff --git a/driver/ghci/Makefile b/driver/ghci/Makefile index 8bb25383ef..47f51b8c23 100644 --- a/driver/ghci/Makefile +++ b/driver/ghci/Makefile @@ -9,8 +9,8 @@ include $(TOP)/mk/boilerplate.mk # 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) diff --git a/mk/install.mk b/mk/install.mk index 41b312c3c5..1efb6958ef 100644 --- a/mk/install.mk +++ b/mk/install.mk @@ -145,7 +145,12 @@ ifneq "$(strip $(INSTALL_PROGS))" "" # 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) |