Add support for INCSNAME and INCSNAME_<file> to bsd.inc.mk.

Same syntax as FILESNAME and FILESNAME_<file>, allows to install
includes under a different name.
Okay'd by christos.
This commit is contained in:
wiz 2001-10-30 15:17:16 +00:00
parent 0bcfd3ca58
commit 59268f6553
2 changed files with 14 additions and 8 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.README,v 1.80 2001/10/13 06:06:55 jmc Exp $
# $NetBSD: bsd.README,v 1.81 2001/10/30 15:17:16 wiz Exp $
# @(#)bsd.README 8.2 (Berkeley) 4/2/94
This is the README file for the new make "include" files for the BSD
@ -500,9 +500,15 @@ from bsd.lib.mk and bsd.prog.mk.
The include file <bsd.inc.mk> defines the includes target and uses two
variables:
INCS The list of include files
INCS The list of include files
INCSDIR The location to install the include files.
INCSDIR The location to install the include files.
INCSNAME Target name of the include file, if only one; same as
FILESNAME, but for include files.
INCSNAME_<file> The name file <file> should be installed as, if not <file>,
same as FILESNAME_<file>, but for include files.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

View File

@ -1,13 +1,13 @@
# $NetBSD: bsd.inc.mk,v 1.17 2001/05/08 03:19:52 sommerfeld Exp $
# $NetBSD: bsd.inc.mk,v 1.18 2001/10/30 15:17:17 wiz Exp $
.PHONY: incinstall
includes: ${INCS} incinstall
.if defined(INCS)
incinstall:: ${INCS:@I@${DESTDIR}${INCSDIR}/$I@}
.PRECIOUS: ${INCS:@I@${DESTDIR}${INCSDIR}/$I@}
incinstall:: ${INCS:@I@${DESTDIR}${INCSDIR_${I}:U${INCSDIR}}/${INCSNAME_${I}:U${INCSNAME:U${I:T}}}@}
.PRECIOUS: ${INCS:@I@${DESTDIR}${INCSDIR_${I}:U${INCSDIR}}/${INCSNAME_${I}:U${INCSNAME:U${I:T}}}@}
.if !defined(UPDATE)
.PHONY: ${INCS:@I@${DESTDIR}${INCSDIR}/$I@}
.PHONY: ${INCS:@I@${DESTDIR}${INCSDIR_${I}:U${INCSDIR}}/${INCSNAME_${I}:U${INCSNAME:U${I:T}}}@}
.endif
__incinstall: .USE
@ -19,7 +19,7 @@ __incinstall: .USE
-g ${BINGRP} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET})
.for I in ${INCS:O:u}
${DESTDIR}${INCSDIR}/$I: $I __incinstall
${DESTDIR}${INCSDIR_${I}:U${INCSDIR}}/${INCSNAME_${I}:U${INCSNAME:U${I:T}}}: ${I} __incinstall
.endfor
.endif