X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Futils%2FmkdependHS%2FMakefile;h=2ceeb700ca463f80743060d2dba9c3ea2c41df48;hb=67fe852eb2e9b3a489b62cbf9259b5a868db5468;hp=abcd8f65a0c334e13eaee9d3484be849e47d4a24;hpb=8e01cd7297b3463afbb9cf0b8f1a78cc6d05956d;p=ghc-hetmet.git diff --git a/ghc/utils/mkdependHS/Makefile b/ghc/utils/mkdependHS/Makefile index abcd8f6..2ceeb70 100644 --- a/ghc/utils/mkdependHS/Makefile +++ b/ghc/utils/mkdependHS/Makefile @@ -1,61 +1,51 @@ +#----------------------------------------------------------------------------- +# $Id: Makefile,v 1.18 1999/10/05 10:30:33 simonmar Exp $ + TOP=../.. include $(TOP)/mk/boilerplate.mk -INSTALLING=0 + +INSTALLING=1 boot :: all -SCRIPT_PROG=mkdependHS -SCRIPT_OBJS=mkdependHS.prl SCRIPT_SUBST_VARS= \ TOP_PWD \ INSTALLING \ - ProjectVersionInt + RAWCPP \ + HscIfaceFileVersion INTERP=perl -# -# install setup -# -INSTALL_SCRIPTS += $(SCRIPT_PROG) +INSTALLED_SCRIPT_PROG = mkdependHS +INPLACE_SCRIPT_PROG = mkdependHS-inplace -ifneq "$(BIN_DIST)" "1" -SCRIPT_SUBST_VARS += libdir datadir RAWCPP TMPDIR SED +ifeq "$(INSTALLING)" "1" +TOP_PWD := $(prefix) +SCRIPT_PROG = $(INSTALLED_SCRIPT_PROG) +SCRIPT_LINK = ghc +else +TOP_PWD := $(FPTOOLS_TOP_ABS) +SCRIPT_PROG = $(INPLACE_SCRIPT_PROG) endif +SCRIPT_OBJS=mkdependHS.prl -# -# Prepend an infomercial if installing (binary-dist or the real thing). -# -ifeq "$(INSTALLING)" "1" ifeq "$(BIN_DIST)" "1" SCRIPT_PREFIX_FILES += prefix.txt -endif +else +SCRIPT_SUBST_VARS += libdir datadir TMPDIR SED endif +# don't recurse on 'make install' +# ifeq "$(INSTALLING)" "1" -TOP_PWD:=$(prefix) -else -TOP_PWD:=$(FPTOOLS_TOP_ABS) +all clean veryclean maintainer-clean :: + $(MAKE) INSTALLING=0 BIN_DIST=0 $(MFLAGS) $@ endif # -# Before really installing the script, we have to -# reconfigure it such that the paths it refers to, -# point to the installed utils. +# install setup # -install :: - $(RM) $(SCRIPT_PROG) - $(MAKE) $(MFLAGS) INSTALLING=1 $(SCRIPT_PROG) - -CLEAN_FILES += $(SCRIPT_PROG) $(SCRIPT_LINK) +INSTALL_LIB_SCRIPTS += $(SCRIPT_PROG) include $(TOP)/mk/target.mk - -# -# Hack to re-create the in-situ build tree script after -# having just installed it (if you don't, confusion ensues -# if you try to use the build tree copy afterwards..) -# -install :: - @$(RM) $(SCRIPT_PROG) - @$(MAKE) $(MFLAGS) $(SCRIPT_PROG)