Fix the build with GHC < 6.4 (foldl1' didn't exist)
[ghc-hetmet.git] / driver / ghc / Makefile
1 #-----------------------------------------------------------------------------
2 # $Id: Makefile,v 1.6 2001/10/23 16:32:30 rrt Exp $
3 #
4
5 TOP=../..
6 include $(TOP)/mk/boilerplate.mk
7
8 # -----------------------------------------------------------------------------
9 # ghc script
10
11 ifneq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
12 LINK = ghc
13 LINK_TARGET = $(LINK)-$(ProjectVersion)
14 INSTALLED_SCRIPT=$(DESTDIR)$(bindir)/$(LINK_TARGET)
15 install::
16         $(RM) -f $(INSTALLED_SCRIPT)
17         echo "#!$(SHELL)"                                 >> $(INSTALLED_SCRIPT)
18         echo "GHCBIN=$(libexecdir)/ghc-$(ProjectVersion)" >> $(INSTALLED_SCRIPT)
19         echo "TOPDIROPT=-B$(libdir)"                      >> $(INSTALLED_SCRIPT)
20         echo 'exec $$GHCBIN $$TOPDIROPT $${1+"$$@"}'      >> $(INSTALLED_SCRIPT)
21         $(EXECUTABLE_FILE) $(INSTALLED_SCRIPT)
22 endif
23
24 # -----------------------------------------------------------------------------
25
26 binary-dist:
27         $(INSTALL_DIR)           $(BIN_DIST_DIR)/driver/ghc
28         $(INSTALL_DATA) Makefile $(BIN_DIST_DIR)/driver/ghc/
29
30 include $(TOP)/mk/target.mk