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