#
#
# HISTORY
#
#  2-Jun-87  Mary Thompson (mrt) at Carnegie Mellon
#	Removed scrubadub option as make can now deal with
#	missing include files. Copied mach_error.h into
#	$(DSTDIR)/include because mig depends on it.
#
# 14-Nov-86  Robert Baron (rvb) at Carnegie-Mellon University
#	replaced scrub -do with mutil Makedep
#
#  Nov 10 86	mrt
#	Made link from machine to ca use relative name for ca
#	otherwise it fails when the tree is moved to /usr/mach
#
# Copy binaries from this directory to DSTDIR/bin and /etc

DSTDIR=/usr/mach
SRCDIR=${DSTDIR}/src
TARGET_DIRS = $(DSTDIR) $(DSTDIR)/etc $(DSTDIR)/bin


populate: $(TARGET_DIRS) inc inst md mig

inc:
	-ln -s ca ${DSTDIR}/include/machine
	cp -p $(SRCDIR)/lib/libmach/mach_error.h $(DSTDIR)/include

inst:
	cp -p ${SRCDIR}/etc/mach_install.csh ${DSTDIR}/etc/mach_install
	cp -p ${SRCDIR}/etc/runmake.csh ${DSTDIR}/etc/runmake

md:
	-@echo ${SRCDIR}/bin; cd ${SRCDIR}/bin; \
 	make ${MFLAGS} "I=$I" DSTDIR=${DSTDIR} SRCDIR=${SRCDIR} md.install
mig:
	-@echo ${SRCDIR}/bin/mig; cd ${SRCDIR}/bin/mig; \
 	make ${MFLAGS} "I=$I" DSTDIR=${DSTDIR} SRCDIR=${SRCDIR} install

$(TARGET_DIRS):
	mkdir $@
