From 2801ff847ca9459d227f155a4dedd395b7d35a30 Mon Sep 17 00:00:00 2001 From: rgrimes Date: Fri, 14 Jan 2000 07:41:11 +0000 Subject: [PATCH] Introduce the new mk internal target _includeinstall and add the controlling knob defaults INCOWN, INCGRP, INCMODE, and INCDIR. Reviewed by: marcel, and make world --- share/mk/bsd.lib.mk | 12 +++++++++++- share/mk/bsd.own.mk | 12 ++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 7d10c329c602..29b61b18cf81 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -259,7 +259,17 @@ _EXTRADEPEND: .if !target(install) .if !target(beforeinstall) -beforeinstall: +beforeinstall: _includeinstall +.endif + +_includeinstall: +.if defined(INCS) +.for header in ${INCS} + cd ${.CURDIR} && \ + ${INSTALL} -C -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} \ + ${header} ${DESTDIR}${INCDIR} + +.endfor .endif .if defined(PRECIOUSLIB) && !defined(NOFSCHG) diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 4ff89e582274..0e14bff13af8 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -39,6 +39,13 @@ # # NOBINMODE Mode for non-executable files. [444] # +# INCOWN Include owner. [root] +# +# INCGRP Include group. [wheel] +# +# INCMODE Include mode. [444] +# +# INCDIR Base path for include files. [/usr/include] # # LIBDIR Base path for libraries. [/usr/lib] # @@ -141,6 +148,11 @@ NOBINMODE?= 444 GAMEGRP?= games +INCOWN?= root +INCGRP?= wheel +INCMODE?= 444 +INCDIR?= /usr/include + KMODDIR?= /modules KMODOWN?= ${BINOWN} KMODGRP?= ${BINGRP}