All installed Haskell prgms have an inplace and an installed version
[ghc-hetmet.git] / utils / runghc / Makefile
1 TOP=../..
2 include $(TOP)/mk/boilerplate.mk
3
4 # We have two version: the inplace version compiled by the bootstrap compiler
5 #   and the install version compiled by the stage 1 compiler
6 ifeq "$(stage)" "2"
7 HS_PROG           = runghc$(exeext)
8 else
9 HS_PROG           = runghc-inplace$(exeext)
10 endif
11 INSTALL_PROGS   += $(HS_PROG)
12
13 UseGhcForCc = YES
14 SRC_MKDEPENDC_OPTS += -I$(GHC_INCLUDE_DIR)
15
16 SRC_HC_OPTS += -Wall
17
18 RUNHASKELL_PROG = runhaskell$(exeext)
19 all :: $(RUNHASKELL_PROG)
20
21 $(RUNHASKELL_PROG) : $(HS_PROG)
22         $(CP) $< $(RUNHASKELL_PROG)
23
24 CLEAN_FILES += $(RUNHASKELL_PROG)
25
26 ifneq "$(NO_INSTALL_RUNHASKELL)" "YES"
27 INSTALL_PROGS += $(RUNHASKELL_PROG)
28 endif
29
30 binary-dist::
31         $(INSTALL_DIR)                $(BIN_DIST_DIR)/utils/runghc
32         $(INSTALL_DATA)    Makefile   $(BIN_DIST_DIR)/utils/runghc/
33         $(INSTALL_PROGRAM) $(HS_PROG) $(BIN_DIST_DIR)/utils/runghc/
34         $(INSTALL_PROGRAM) $(RUNHASKELL_PROG) $(BIN_DIST_DIR)/utils/runghc/
35
36 include $(TOP)/mk/target.mk