[project @ 2001-03-26 16:51:26 by simonmar]
authorsimonmar <unknown>
Mon, 26 Mar 2001 16:51:27 +0000 (16:51 +0000)
committersimonmar <unknown>
Mon, 26 Mar 2001 16:51:27 +0000 (16:51 +0000)
mini-drivers for GHC 5  (ghci moved from ghc/driver to ghc/driver/ghci, ghc
is new).

ghc/driver/ghc/Makefile [new file with mode: 0644]
ghc/driver/ghc/ghc.sh [new file with mode: 0644]
ghc/driver/ghci/Makefile [new file with mode: 0644]
ghc/driver/ghci/ghci.sh [new file with mode: 0644]

diff --git a/ghc/driver/ghc/Makefile b/ghc/driver/ghc/Makefile
new file mode 100644 (file)
index 0000000..557ef68
--- /dev/null
@@ -0,0 +1,29 @@
+#-----------------------------------------------------------------------------
+# $Id: Makefile,v 1.1 2001/03/26 16:51:26 simonmar Exp $
+#
+
+TOP=../..
+include $(TOP)/mk/boilerplate.mk
+
+# -----------------------------------------------------------------------------
+# ghc script
+
+ifeq "$(BIN_DIST)"   "1"
+GHCBIN=$$\"\"libdir/ghc-$(ProjectVersion)
+GHCLIB=$$\"\"libdir
+else
+GHCBIN=$(libdir)/ghc-$(ProjectVersion)
+GHCLIB=$(libdir)
+endif # BIN_DIST
+
+SCRIPT_PROG      = ghc-$(ProjectVersion)
+SCRIPT_OBJS      = ghc.sh
+INTERP           = $(SHELL)
+TOPDIROPT        = -B$(GHCLIB)
+SCRIPT_SUBST_VARS = GHCBIN TOPDIROPT
+LINK             = ghc
+INSTALL_SCRIPTS  += $(SCRIPT_PROG) ghc
+
+# -----------------------------------------------------------------------------
+
+include $(TOP)/mk/target.mk
diff --git a/ghc/driver/ghc/ghc.sh b/ghc/driver/ghc/ghc.sh
new file mode 100644 (file)
index 0000000..780b949
--- /dev/null
@@ -0,0 +1,2 @@
+# Mini-driver for GHC
+exec $GHCBIN $TOPDIROPT ${1+"$@"}
diff --git a/ghc/driver/ghci/Makefile b/ghc/driver/ghci/Makefile
new file mode 100644 (file)
index 0000000..e4caf48
--- /dev/null
@@ -0,0 +1,51 @@
+#-----------------------------------------------------------------------------
+# $Id: Makefile,v 1.1 2001/03/26 16:51:27 simonmar Exp $
+#
+
+TOP=../..
+include $(TOP)/mk/boilerplate.mk
+
+# hack for ghci-inplace script, see below
+INSTALLING=1
+
+# -----------------------------------------------------------------------------
+# ghci script
+
+ifeq "$(INSTALLING)" "1"
+ifeq "$(BIN_DIST)"   "1"
+GHCBIN=$$\"\"libdir/ghc
+GHCLIB=$$\"\"libdir
+else
+GHCBIN=$(libdir)/ghc
+GHCLIB=$(libdir)
+endif # BIN_DIST
+else
+GHCBIN=$(FPTOOLS_TOP_ABS)/ghc/compiler/ghc
+GHCLIB=$(FPTOOLS_TOP_ABS)
+endif
+
+INSTALLED_SCRIPT_PROG  = ghci-$(ProjectVersion)
+INPLACE_SCRIPT_PROG    = ghci-inplace
+
+SCRIPT_OBJS      = ghci.sh
+INTERP           = $(SHELL)
+SCRIPT_SUBST_VARS = GHCBIN TOPDIROPT
+INSTALL_SCRIPTS  += $(SCRIPT_PROG) ghc5
+TOPDIROPT        = -B$(GHCLIB)
+
+ifeq "$(INSTALLING)" "1"
+SCRIPT_PROG    =  $(INSTALLED_SCRIPT_PROG)
+LINK           =  ghci
+else
+SCRIPT_PROG    =  $(INPLACE_SCRIPT_PROG)
+endif
+
+# don't recurse on 'make install'
+#
+ifeq "$(INSTALLING)" "1"
+all clean distclean maintainer-clean ::
+       $(MAKE) INSTALLING=0 BIN_DIST=0 $(MFLAGS) $@
+endif
+
+include $(TOP)/mk/target.mk
+
diff --git a/ghc/driver/ghci/ghci.sh b/ghc/driver/ghci/ghci.sh
new file mode 100644 (file)
index 0000000..b020047
--- /dev/null
@@ -0,0 +1,2 @@
+# Mini-driver for GHCi
+exec $GHCBIN $TOPDIROPT --interactive ${1+"$@"}