From: simonmar Date: Sun, 11 Feb 2001 16:32:48 +0000 (+0000) Subject: [project @ 2001-02-11 16:32:48 by simonmar] X-Git-Tag: Approximately_9120_patches~2686 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=df8e2ee0f8dc67c4bc995c697c747634f795dc1b;p=ghc-hetmet.git [project @ 2001-02-11 16:32:48 by simonmar] Create ghci-$(ProjectVersion) and ghci-inplace mini-scripts, and a ghci->ghci-$(ProjectVersion) link. I put these in here rather than ghc/compiler, because ghc/compiler already has a ghci subdirectory. --- diff --git a/ghc/driver/Makefile b/ghc/driver/Makefile index 524abd4..c9d19f6 100644 --- a/ghc/driver/Makefile +++ b/ghc/driver/Makefile @@ -1,11 +1,14 @@ #----------------------------------------------------------------------------- -# $Id: Makefile,v 1.50 2000/12/20 10:42:54 simonmar Exp $ +# $Id: Makefile,v 1.51 2001/02/11 16:32:48 simonmar Exp $ # TOP=.. CURRENT_DIR=ghc/driver include $(TOP)/mk/boilerplate.mk +# hack for ghci-inplace script, see below +INSTALLING=1 + ifeq "$(GhcWithHscBuiltViaC)" "YES" HC=$(GHC_INPLACE) endif @@ -21,7 +24,9 @@ else SRC_HC_OPTS += -fglasgow-exts -cpp -syslib concurrent -syslib posix -syslib misc endif +ifeq "$(INSTALLING)" "1" SUBDIRS = mangler split +endif # ----------------------------------------------------------------------------- # Create compiler configuration @@ -67,6 +72,46 @@ INSTALL_DATAS += package.conf CLEAN_FILES += pkgconf package.conf.inplace package.conf # ----------------------------------------------------------------------------- +# ghci script + +ifeq "$(INSTALLING)" "1" +ifeq "$(BIN_DIST)" "1" +GHCBIN=$$\"\"bindir/ghc +else +GHCBIN=$(bindir)/ghc +endif # BIN_DIST +else +GHCBIN=$(FPTOOLS_TOP_ABS)/ghc/compiler/ghc +endif + +INSTALLED_SCRIPT_PROG = ghci-$(ProjectVersion) +INPLACE_SCRIPT_PROG = ghci-inplace + +ifeq "$(INSTALLING)" "1" +TOP_PWD := $(prefix) +SCRIPT_PROG = $(INSTALLED_SCRIPT_PROG) +SCRIPT_LINK = ghci +else +TOP_PWD := $(FPTOOLS_TOP_ABS) +SCRIPT_PROG = $(INPLACE_SCRIPT_PROG) +endif + +SCRIPT_OBJS=ghci.sh + +INTERP=$(SHELL) + +SCRIPT_SUBST_VARS = GHCBIN + +INSTALL_SCRIPTS += $(SCRIPT_PROG) + +# don't recurse on 'make install' +# +ifeq "$(INSTALLING)" "1" +all clean distclean maintainer-clean :: + $(MAKE) INSTALLING=0 BIN_DIST=0 $(MFLAGS) $@ +endif + +# ----------------------------------------------------------------------------- # installation... override datadir=$(libdir) diff --git a/ghc/driver/ghci.sh b/ghc/driver/ghci.sh new file mode 100644 index 0000000..2df307b --- /dev/null +++ b/ghc/driver/ghci.sh @@ -0,0 +1,2 @@ +# Mini-driver for GHCi +exec $GHCBIN --interactive $*