ghc.mk 1.25 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
# -----------------------------------------------------------------------------
#
# (c) 2009 The University of Glasgow
#
# This file is part of the GHC build system.
#
# To understand how the build system works and how to modify it, see
#      http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
#      http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
#
# -----------------------------------------------------------------------------

Ian Lynagh's avatar
Ian Lynagh committed
13
14
15
16
17
18
19
20
21
utils/runghc_dist_MODULES = Main
utils/runghc_dist_HC_OPTS = -cpp -DVERSION="\"$(ProjectVersion)\""
utils/runghc_dist_PROG    = runghc$(exeext)
utils/runghc_dist_SHELL_WRAPPER = YES
utils/runghc_dist_INSTALL_SHELL_WRAPPER = YES

ifneq "$(BINDIST)" "YES"
# hack: the build system has trouble with Main modules not called Main.hs
utils/runghc/dist/build/Main.hs : utils/runghc/runghc.hs $(MKDIRHIER)
22
23
	"$(MKDIRHIER)" $(dir $@)
	"$(CP)" $< $@
24
endif
Ian Lynagh's avatar
Ian Lynagh committed
25
26
27
28
29
30
31
32

$(eval $(call build-prog,utils/runghc,dist,1))

install: install_runhaskell

.PHONY: install_runhaskell
ifeq "$(Windows)" "YES"
install_runhaskell: install_bins
33
	"$(CP)" $(DESTDIR)$(bindir)/runghc$(exeext) $(DESTDIR)$(bindir)/runhaskell$(exeext)
Ian Lynagh's avatar
Ian Lynagh committed
34
35
else
install_runhaskell:
36
	"$(RM)" $(RM_OPTS) $(DESTDIR)$(bindir)/runhaskell
Ian Lynagh's avatar
Ian Lynagh committed
37
38
39
	$(LN_S) runghc $(DESTDIR)$(bindir)/runhaskell
endif