bindists are now some way towards working
[ghc-hetmet.git] / driver / ghci / Makefile
index c3fad15..94fe452 100644 (file)
@@ -17,11 +17,12 @@ endif
 
 ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
 INSTALL_PROGS    += $(C_PROG)
-GHCII_SCRIPT=$(bindir)/ghcii.sh
+GHCII_SCRIPT=$(DESTDIR)$(bindir)/ghcii.sh
 install::
        $(RM) -f $(GHCII_SCRIPT)
        echo "#!$(SHELL)"                                  >> $(GHCII_SCRIPT)
        echo 'exec "$$0"/../ghc --interactive $${1+"$$@"}' >> $(GHCII_SCRIPT)
+       chmod +x $(GHCII_SCRIPT)
 else
 LINK = ghci
 LINK_TARGET = $(LINK)-$(ProjectVersion)
@@ -36,7 +37,8 @@ install::
 endif
 
 ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
-INPLACE_SCRIPT=ghc-pkg-inplace
+INPLACE_SCRIPT=ghci-inplace
+CLEAN_FILES += $(INPLACE_SCRIPT)
 all::
        $(RM) -f $(INPLACE_SCRIPT)
        echo "#!$(SHELL)"                                                              >> $(INPLACE_SCRIPT)
@@ -51,8 +53,6 @@ ghci.res : ghci.rc ghci.ico
        windres --preprocessor="$(CPP) -xc -DRC_INVOKED" -o ghci.res -i ghci.rc -O coff
 endif
 
-binary-dist:
-       $(INSTALL_DIR)           $(BIN_DIST_DIR)/driver/ghci
-       $(INSTALL_DATA) Makefile $(BIN_DIST_DIR)/driver/ghci/
+include $(TOP)/mk/bindist.mk
 
 include $(TOP)/mk/target.mk