Add install.files rule. Tools with support files can use HOSTFILES and

HOST_FILESDIR to install support files (just like bsd.files.mk normally
would be doing.
This commit is contained in:
jmc 2001-10-13 06:09:25 +00:00
parent c55dbe210b
commit b8b456e6f9
1 changed files with 15 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.host,v 1.1 2001/08/14 11:01:56 tv Exp $
# $NetBSD: Makefile.host,v 1.2 2001/10/13 06:09:25 jmc Exp $
# Preload <bsd.obj.mk> to set up obj rules (with proper ${.CURDIR}).
.include <bsd.obj.mk>
@ -32,8 +32,21 @@ ${TIMESTAMP}: ${.CURDIR}/Makefile
.include <bsd.hostprog.mk>
# Install rule.
realinstall: install.host
realinstall: install.host install.files
install.host:
mkdir -p ${HOST_BINDIR}
${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -m ${BINMODE} \
${HOSTPROG} ${HOST_BINDIR}/${HOSTPROGNAME}
.if defined(HOSTFILES)
install.files:
mkdir -p ${HOST_FILESDIR}
for i in ${HOSTFILES}; \
do \
${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -m ${NONBINMODE} \
${.CURDIR}/$$i ${HOST_FILESDIR}/$$i; \
done
.else
install.files:
.endif