1 #-----------------------------------------------------------------------------
2 # $Id: Makefile,v 1.3 1997/03/13 09:10:17 sof Exp $
5 include $(TOP)/mk/boilerplate.mk
11 SCRIPT_PROG=stat2resid
12 SCRIPT_OBJS=stat2resid.prl
15 # Could be overridden from the cmd line (see install rule below).
19 SCRIPT_SUBST_VARS=TMPDIR SCRIPT_PATH
22 CLEAN_FILES += $(SCRIPT_PROG)
25 # The stat2resid script is configured with a different
26 # path to the supporting perl scripts, depending on whether it
27 # is to be installed or not.
29 ifeq "$(INSTALLING)" "1"
30 SCRIPT_PATH:=$(libdir)
32 SCRIPT_PATH:=$(FPTOOLS_TOP_ABS)/ghc/utils/stat2resid
38 INSTALL_LIBS += $(DYN_LOADABLE_BITS)
39 INSTALL_PROGS += $(SCRIPT_PROG)
43 # Before really installing the script, we have to
44 # reconfigure it such that the paths it refers to,
45 # point to the installed utils.
49 $(MAKE) $(MFLAGS) INSTALLING=1 $(SCRIPT_PROG)
51 include $(TOP)/mk/target.mk
53 # Hack to re-create the in-situ build tree script after
54 # having just installed it.
58 @$(MAKE) $(MFLAGS) $(SCRIPT_PROG)