X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Futils%2Fhscpp%2FMakefile;h=cfd508278942c638de8122875ec8792069b91d70;hb=refs%2Ftags%2FApproximately_1000_patches_recorded;hp=a7833213d672da64ac912cd0dca07e62e67a6f76;hpb=e79bf06e21221a04c4b05a1805ea511ba73796ce;p=ghc-hetmet.git diff --git a/ghc/utils/hscpp/Makefile b/ghc/utils/hscpp/Makefile index a783321..cfd5082 100644 --- a/ghc/utils/hscpp/Makefile +++ b/ghc/utils/hscpp/Makefile @@ -1,11 +1,13 @@ TOP=../.. include $(TOP)/mk/boilerplate.mk -override WAYS= SCRIPT_PROG=hscpp SCRIPT_OBJS=hscpp.prl SCRIPT_SUBST_VARS=RAWCPP +# Note: might be overridden from cmd-line (see install rule below) +INSTALLING=0 + # no INTERP: do *not* want #! script stuck on the front # what's the deal? I'll add it for now -- SOF INTERP=perl @@ -13,8 +15,29 @@ INTERP=perl # # install setup # -INSTALL_LIBEXECS += $(SCRIPT_PROG) +INSTALL_LIB_SCRIPTS+=$(SCRIPT_PROG) +INSTALL_LIBEXECS=$(C_PROG) + + +# +# Before really installing the script, we have to +# reconfigure it such that the paths it refers to, +# point to the installed utils. +# +install :: + @$(RM) $(SCRIPT_PROG) + @$(MAKE) $(MFLAGS) INSTALLING=1 $(SCRIPT_PROG) + + CLEAN_FILES += $(SCRIPT_PROG) 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) BIN_DIST=0 $(SCRIPT_PROG) +