summaryrefslogtreecommitdiff
path: root/driver/ghc/Makefile
blob: fc9bb4ad3a42341288f6cadb33f329bcd7b1a81c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#-----------------------------------------------------------------------------
# $Id: Makefile,v 1.6 2001/10/23 16:32:30 rrt Exp $
#

TOP=../..
include $(TOP)/mk/boilerplate.mk

# -----------------------------------------------------------------------------
# ghc script

ifneq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
LINK = ghc
LINK_TARGET = $(LINK)-$(ProjectVersion)
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 $${1+"$$@"}'      >> $(INSTALLED_SCRIPT)
	$(EXECUTABLE_FILE) $(INSTALLED_SCRIPT)
endif

# -----------------------------------------------------------------------------

include $(TOP)/mk/bindist.mk

include $(TOP)/mk/target.mk