Fix scoped type variables for expression type signatures
[ghc-hetmet.git] / utils / stat2resid / Makefile
1 TOP=../..
2 include $(TOP)/mk/boilerplate.mk
3
4 DYN_LOADABLE_BITS = \
5         parse-gcstats.prl \
6         process-gcstats.prl
7
8 SCRIPT_PROG=stat2resid
9 SCRIPT_OBJS=stat2resid.prl
10
11 #
12 # Could be overridden from the cmd line (see install rule below).
13 #
14 INSTALLING=0
15
16 ifneq "$(BIN_DIST)" "1"
17 SCRIPT_SUBST_VARS=DEFAULT_TMPDIR
18 endif
19
20 INTERP=perl
21
22 #
23 # The stat2resid script is configured with a different
24 # path to the supporting perl scripts, depending on whether it
25 # is to be installed or not.
26 #
27 ifeq "$(INSTALLING)" "1"
28 ifeq "$(BIN_DIST)" "1"
29 SCRIPT_PREFIX_FILES += prefix.txt
30 endif
31 endif
32
33 #
34 # install setup
35
36 INSTALL_LIBS    += $(DYN_LOADABLE_BITS)
37 INSTALL_SCRIPTS += $(SCRIPT_PROG)
38
39
40 #
41 # Before really installing the script, we have to
42 # reconfigure it such that the paths it refers to,
43 # point to the installed utils.
44 #
45 install ::
46         $(RM) $(SCRIPT_PROG)
47         $(MAKE) $(MFLAGS) INSTALLING=1 $(SCRIPT_PROG)
48
49 include $(TOP)/mk/target.mk
50
51 # Hack to re-create the in-situ build tree script after 
52 # having just installed it.
53 #
54 install ::
55         @$(RM) $(SCRIPT_PROG)
56         @$(MAKE) $(MFLAGS) $(SCRIPT_PROG)