X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=driver%2Fghci%2FMakefile;h=789aec0c215d03315a28f891388eb725a27b322e;hb=e1826dcc04394bc35769573eea250ada2e1ad1a0;hp=ac6d3834fc5094179965eae2048cee7875b19057;hpb=da6f8e12f3888e5bfe5f9198661fab432fd4467e;p=ghc-hetmet.git diff --git a/driver/ghci/Makefile b/driver/ghci/Makefile index ac6d383..789aec0 100644 --- a/driver/ghci/Makefile +++ b/driver/ghci/Makefile @@ -17,32 +17,31 @@ 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) -INSTALLED_SCRIPT=$(bindir)/$(LINK_TARGET) +INSTALLED_SCRIPT=$(DESTDIR)$(bindir)/$(LINK_TARGET) install:: $(RM) -f $(INSTALLED_SCRIPT) - echo "#!$(SHELL)" >> $(INSTALLED_SCRIPT) - echo "GHCBIN=$(libexecdir)/ghc-$(ProjectVersion)" >> $(INSTALLED_SCRIPT) - echo "TOPDIROPT=-B$(libdir)" >> $(INSTALLED_SCRIPT) - echo 'exec $$GHCBIN $$TOPDIROPT --interactive $${1+"$$@"}' >> $(INSTALLED_SCRIPT) + echo "#!$(SHELL)" >> $(INSTALLED_SCRIPT) + echo 'exec $(bindir)/ghc --interactive $${1+"$$@"}' >> $(INSTALLED_SCRIPT) $(EXECUTABLE_FILE) $(INSTALLED_SCRIPT) endif ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32" -INPLACE_SCRIPT=ghc-pkg-inplace +INPLACE_SCRIPT = ghci +INPLACE_GHC = $(FPTOOLS_TOP_ABS)/ghc/stage2-inplace/ghc +CLEAN_FILES += $(INPLACE_SCRIPT) all:: $(RM) -f $(INPLACE_SCRIPT) - echo "#!$(SHELL)" >> $(INPLACE_SCRIPT) - echo "GHCBIN=$(FPTOOLS_TOP_ABS)/$(GHC_COMPILER_DIR_REL)/ghc-$(ProjectVersion)" >> $(INPLACE_SCRIPT) - echo "TOPDIROPT=$(FPTOOLS_TOP_ABS)" >> $(INPLACE_SCRIPT) - echo 'exec $$GHCPKGBIN --global-conf $$PKGCONF $${1+"$$@"}' >> $(INPLACE_SCRIPT) + echo "#!$(SHELL)" >> $(INPLACE_SCRIPT) + echo "exec $(INPLACE_GHC) --interactive $${1+"$$@"}" >> $(INPLACE_SCRIPT) $(EXECUTABLE_FILE) $(INPLACE_SCRIPT) endif @@ -51,8 +50,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