1 #-----------------------------------------------------------------------------
2 # $Id: Makefile,v 1.11 2005/05/05 00:58:38 sof Exp $
6 include $(TOP)/mk/boilerplate.mk
8 # -----------------------------------------------------------------------------
11 ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
18 ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
19 INSTALL_PROGS += $(C_PROG)
20 GHCII_SCRIPT=$(DESTDIR)$(bindir)/ghcii.sh
22 $(RM) -f $(GHCII_SCRIPT)
23 echo "#!$(SHELL)" >> $(GHCII_SCRIPT)
24 echo 'exec "$$0"/../ghc --interactive $${1+"$$@"}' >> $(GHCII_SCRIPT)
27 LINK_TARGET = $(LINK)-$(ProjectVersion)
28 INSTALLED_SCRIPT=$(DESTDIR)$(bindir)/$(LINK_TARGET)
30 $(RM) -f $(INSTALLED_SCRIPT)
31 echo "#!$(SHELL)" >> $(INSTALLED_SCRIPT)
32 echo "GHCBIN=$(libexecdir)/ghc-$(ProjectVersion)" >> $(INSTALLED_SCRIPT)
33 echo "TOPDIROPT=-B$(libdir)" >> $(INSTALLED_SCRIPT)
34 echo 'exec $$GHCBIN $$TOPDIROPT --interactive $${1+"$$@"}' >> $(INSTALLED_SCRIPT)
35 $(EXECUTABLE_FILE) $(INSTALLED_SCRIPT)
38 ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
39 INPLACE_SCRIPT=ghci-inplace
40 CLEAN_FILES += $(INPLACE_SCRIPT)
42 $(RM) -f $(INPLACE_SCRIPT)
43 echo "#!$(SHELL)" >> $(INPLACE_SCRIPT)
44 echo "GHCBIN=$(FPTOOLS_TOP_ABS)/$(GHC_COMPILER_DIR_REL)/ghc-$(ProjectVersion)" >> $(INPLACE_SCRIPT)
45 echo "TOPDIROPT=$(FPTOOLS_TOP_ABS)" >> $(INPLACE_SCRIPT)
46 echo 'exec $$GHCPKGBIN --global-conf $$PKGCONF $${1+"$$@"}' >> $(INPLACE_SCRIPT)
47 $(EXECUTABLE_FILE) $(INPLACE_SCRIPT)
50 ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
51 ghci.res : ghci.rc ghci.ico
52 windres --preprocessor="$(CPP) -xc -DRC_INVOKED" -o ghci.res -i ghci.rc -O coff
56 $(INSTALL_DIR) $(BIN_DIST_DIR)/driver/ghci
57 $(INSTALL_DATA) Makefile $(BIN_DIST_DIR)/driver/ghci/
59 include $(TOP)/mk/target.mk