[project @ 1997-09-05 09:16:19 by simonm]
[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 # no INTERP: do *not* want #! script stuck on the front
12 # what's the deal? I'll add it for now  -- SOF
13 INTERP=perl
14
15 #
16 # install setup
17 #
18 INSTALL_LIB_SCRIPTS+=$(SCRIPT_PROG)
19 INSTALL_LIBEXECS=$(C_PROG)
20
21
22 #
23 # Before really installing the script, we have to
24 # reconfigure it such that the paths it refers to,
25 # point to the installed utils.
26 #
27 install ::
28         @$(RM) $(SCRIPT_PROG)
29         @$(MAKE) $(MFLAGS) INSTALLING=1 $(SCRIPT_PROG)
30
31
32 CLEAN_FILES += $(SCRIPT_PROG)
33
34 include $(TOP)/mk/target.mk
35
36
37 # Hack to re-create the in-situ build tree script after 
38 # having just installed it.
39 #
40 install ::
41         @$(RM) $(SCRIPT_PROG)
42         @$(MAKE) $(MFLAGS) BIN_DIST=0 $(SCRIPT_PROG)
43