summaryrefslogtreecommitdiffstats
path: root/share/mk
diff options
context:
space:
mode:
authorrgrimes <rgrimes@FreeBSD.org>2000-01-14 07:41:11 +0000
committerrgrimes <rgrimes@FreeBSD.org>2000-01-14 07:41:11 +0000
commit2801ff847ca9459d227f155a4dedd395b7d35a30 (patch)
treeded2eed24fe405c1ea874e27a5e7dc27156d143a /share/mk
parent2d989cd686df201901f4279380d0010fdae042ca (diff)
downloadFreeBSD-src-2801ff847ca9459d227f155a4dedd395b7d35a30.zip
FreeBSD-src-2801ff847ca9459d227f155a4dedd395b7d35a30.tar.gz
Introduce the new mk internal target _includeinstall and add the
controlling knob defaults INCOWN, INCGRP, INCMODE, and INCDIR. Reviewed by: marcel, and make world
Diffstat (limited to 'share/mk')
-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 7d10c32..29b61b1 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 4ff89e5..0e14bff 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}
OpenPOWER on IntegriCloud