ba69ac64a0265b324eee19f5d20efef25787ed24
[ghc-hetmet.git] / ghc / utils / hscpp / Makefile
1 TOP=../..
2 include $(TOP)/mk/boilerplate.mk
3 override WAYS=
4
5 SCRIPT_PROG=hscpp
6 SCRIPT_OBJS=hscpp.prl
7 SCRIPT_SUBST_VARS=RAWCPP
8
9 # Note: might be overridden from cmd-line (see install rule below)
10 INSTALLING=0
11
12 # no INTERP: do *not* want #! script stuck on the front
13 # what's the deal? I'll add it for now  -- SOF
14 INTERP=perl
15
16 #
17 # install setup
18 #
19 INSTALL_LIB_SCRIPTS+=$(SCRIPT_PROG)
20 INSTALL_LIBEXECS=$(C_PROG)
21
22
23 #
24 # Before really installing the script, we have to
25 # reconfigure it such that the paths it refers to,
26 # point to the installed utils.
27 #
28 install ::
29         @$(RM) $(SCRIPT_PROG)
30         @$(MAKE) $(MFLAGS) INSTALLING=1 $(SCRIPT_PROG)
31
32
33 CLEAN_FILES += $(SCRIPT_PROG)
34
35 include $(TOP)/mk/target.mk
36
37
38 # Hack to re-create the in-situ build tree script after 
39 # having just installed it.
40 #
41 install ::
42         @$(RM) $(SCRIPT_PROG)
43         @$(MAKE) $(MFLAGS) BIN_DIST=0 $(SCRIPT_PROG)
44