From 59268f6553b87893c15f1b02bb8690f601e018ec Mon Sep 17 00:00:00 2001 From: wiz Date: Tue, 30 Oct 2001 15:17:16 +0000 Subject: [PATCH] Add support for INCSNAME and INCSNAME_ to bsd.inc.mk. Same syntax as FILESNAME and FILESNAME_, allows to install includes under a different name. Okay'd by christos. --- share/mk/bsd.README | 12 +++++++++--- share/mk/bsd.inc.mk | 10 +++++----- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/share/mk/bsd.README b/share/mk/bsd.README index 231eaf92a222..c01e61de79f3 100644 --- a/share/mk/bsd.README +++ b/share/mk/bsd.README @@ -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 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_ The name file should be installed as, if not , + same as FILESNAME_, but for include files. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= diff --git a/share/mk/bsd.inc.mk b/share/mk/bsd.inc.mk index cdc19807d21b..96f72b05c275 100644 --- a/share/mk/bsd.inc.mk +++ b/share/mk/bsd.inc.mk @@ -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