aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRodney W. Grimes <rgrimes@FreeBSD.org>2000-01-14 07:41:11 +0000
committerRodney W. Grimes <rgrimes@FreeBSD.org>2000-01-14 07:41:11 +0000
commitfccf86c1a443ed9e2359c8a05e6ec462078e5629 (patch)
treeca51a27eab7a41527165bf7077fb8f20a7abf2c5
parentc5191a983c014b7f4cec5f3475a3a3c81616cc3d (diff)
downloadsrc-fccf86c1a443ed9e2359c8a05e6ec462078e5629.tar.gz
src-fccf86c1a443ed9e2359c8a05e6ec462078e5629.zip
Introduce the new mk internal target _includeinstall and add the
controlling knob defaults INCOWN, INCGRP, INCMODE, and INCDIR. Reviewed by: marcel, and make world
Notes
Notes: svn path=/head/; revision=55954
-rw-r--r--share/mk/bsd.lib.mk12
-rw-r--r--share/mk/bsd.own.mk12
2 files changed, 23 insertions, 1 deletions
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}