Remove duplicate PrimopWrappers generation
[ghc-hetmet.git] / utils / runghc / ghc.mk
1 # -----------------------------------------------------------------------------
2 #
3 # (c) 2009 The University of Glasgow
4 #
5 # This file is part of the GHC build system.
6 #
7 # To understand how the build system works and how to modify it, see
8 #      http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
9 #      http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
10 #
11 # -----------------------------------------------------------------------------
12
13 utils/runghc_PACKAGE = runghc
14 utils/runghc_dist_USES_CABAL = YES
15 utils/runghc_dist_PROG    = runghc$(exeext)
16 utils/runghc_dist_SHELL_WRAPPER = YES
17 utils/runghc_dist_INSTALL_SHELL_WRAPPER = YES
18 utils/runghc_dist_EXTRA_HC_OPTS = -cpp -DVERSION="\"$(ProjectVersion)\""
19
20 ifneq "$(BINDIST)" "YES"
21 # hack: the build system has trouble with Main modules not called Main.hs
22 utils/runghc/dist/build/Main.hs : utils/runghc/runghc.hs | $$(dir $$@)/.
23         "$(CP)" $< $@
24 endif
25
26 $(eval $(call build-prog,utils/runghc,dist,1))
27
28 install: install_runhaskell
29
30 .PHONY: install_runhaskell
31 ifeq "$(Windows)" "YES"
32 install_runhaskell: install_bins
33         "$(CP)" $(DESTDIR)$(bindir)/runghc$(exeext) $(DESTDIR)$(bindir)/runhaskell$(exeext)
34 else
35 install_runhaskell:
36         "$(RM)" $(RM_OPTS) "$(DESTDIR)$(bindir)/runhaskell"
37         $(LN_S) runghc "$(DESTDIR)$(bindir)/runhaskell"
38 endif
39