6a85958ef5ced787c1816e5e5d9fb515788c6193
[ghc-hetmet.git] / ghc / utils / hscpp / Makefile
1 TOP=../..
2 include $(TOP)/mk/boilerplate.mk
3
4 SCRIPT_PROG=hscpp
5 SCRIPT_OBJS=hscpp.prl
6 SCRIPT_SUBST_VARS= RAWCPP
7
8 # Note: might be overridden from cmd-line (see install rule below)
9 INSTALLING=0
10
11 INTERP=perl
12
13 #
14 # install setup
15 #
16 INSTALL_LIB_SCRIPTS+=$(SCRIPT_PROG)
17 INSTALL_LIBEXECS=$(C_PROG)
18
19
20 #
21 # Before really installing the script, we have to
22 # reconfigure it such that the paths it refers to,
23 # point to the installed utils.
24 #
25 install ::
26         @$(RM) $(SCRIPT_PROG)
27         @$(MAKE) $(MFLAGS) INSTALLING=1 $(SCRIPT_PROG)
28
29
30 include $(TOP)/mk/target.mk
31
32
33 # Hack to re-create the in-situ build tree script after 
34 # having just installed it.
35 #
36 install ::
37         @$(RM) $(SCRIPT_PROG)
38         @$(MAKE) $(MFLAGS) BIN_DIST=0 $(SCRIPT_PROG)
39