X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Futils%2Fstat2resid%2FMakefile;h=42c0c4107f0d818478464117aea34dacef83f622;hb=dccacbf9dd82d82657f4885a91d3deb57ce22f53;hp=13afc5ddffb7e694659ccfa0b545339991327bb5;hpb=02b60157852c1bf3c371b47c33d83814a05153bc;p=ghc-hetmet.git diff --git a/ghc/utils/stat2resid/Makefile b/ghc/utils/stat2resid/Makefile index 13afc5d..42c0c41 100644 --- a/ghc/utils/stat2resid/Makefile +++ b/ghc/utils/stat2resid/Makefile @@ -1,19 +1,59 @@ #----------------------------------------------------------------------------- -# $Id: Makefile,v 1.2 1996/11/21 16:49:10 simonm Exp $ +# $Id: Makefile,v 1.11 2000/09/05 10:16:41 simonmar Exp $ -TOP=../../.. -include $(TOP)/ghc/mk/ghc.mk +TOP=../.. +include $(TOP)/mk/boilerplate.mk DYN_LOADABLE_BITS = \ parse-gcstats.prl \ process-gcstats.prl -PROG=stat2resid -SRC=stat2resid.prl -INTERP=$(PERL) -DESTDIR=$(INSTBINDIR_GHC) +SCRIPT_PROG=stat2resid +SCRIPT_OBJS=stat2resid.prl +# +# Could be overridden from the cmd line (see install rule below). +# +INSTALLING=0 + +ifneq "$(BIN_DIST)" "1" +SCRIPT_SUBST_VARS=DEFAULT_TMPDIR +endif + +INTERP=perl + +# +# The stat2resid script is configured with a different +# path to the supporting perl scripts, depending on whether it +# is to be installed or not. +# +ifeq "$(INSTALLING)" "1" +ifeq "$(BIN_DIST)" "1" +SCRIPT_PREFIX_FILES += prefix.txt +endif +endif + +# +# install setup +# +INSTALL_LIBS += $(DYN_LOADABLE_BITS) +INSTALL_SCRIPTS += $(SCRIPT_PROG) + + +# +# Before really installing the script, we have to +# reconfigure it such that the paths it refers to, +# point to the installed utils. +# install :: - $(INSTALL) $(INSTDATAFLAGS) $(DYN_LOADABLE_BITS) $(INSTLIBDIR_GHC) + $(RM) $(SCRIPT_PROG) + $(MAKE) $(MFLAGS) INSTALLING=1 $(SCRIPT_PROG) -include $(TOP)/mk/script.mk +include $(TOP)/mk/target.mk + +# Hack to re-create the in-situ build tree script after +# having just installed it. +# +install :: + @$(RM) $(SCRIPT_PROG) + @$(MAKE) $(MFLAGS) $(SCRIPT_PROG)