summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.files.mk
diff options
context:
space:
mode:
Diffstat (limited to 'share/mk/bsd.files.mk')
-rw-r--r--share/mk/bsd.files.mk21
1 files changed, 21 insertions, 0 deletions
diff --git a/share/mk/bsd.files.mk b/share/mk/bsd.files.mk
index 240f958..9ddb315 100644
--- a/share/mk/bsd.files.mk
+++ b/share/mk/bsd.files.mk
@@ -22,6 +22,10 @@ ${group}OWN?= ${SHAREOWN}
${group}GRP?= ${SHAREGRP}
${group}MODE?= ${SHAREMODE}
${group}DIR?= ${BINDIR}
+.if !make(buildincludes)
+STAGE_SETS+= ${group}
+.endif
+STAGE_DIR.${group}= ${STAGE_OBJTOP}${${group}DIR}
_${group}FILES=
.for file in ${${group}}
@@ -37,6 +41,12 @@ ${group}NAME_${file:T}?= ${${group}NAME}
.else
${group}NAME_${file:T}?= ${file:T}
.endif
+.if !make(buildincludes)
+STAGE_AS_SETS+= ${group}
+.endif
+STAGE_AS_${file:T}= ${${group}NAME_${file:T}}
+stage_as.${group}: ${file}
+
installfiles: _${group}INS_${file:T}
_${group}INS_${file:T}: ${file}
${INSTALL} -o ${${group}OWN_${.ALLSRC:T}} \
@@ -48,6 +58,8 @@ _${group}FILES+= ${file}
.endif
.endfor
.if !empty(_${group}FILES)
+stage_files.${group}: ${_${group}FILES}
+
installfiles: _${group}INS
_${group}INS: ${_${group}FILES}
.if defined(${group}NAME)
@@ -67,3 +79,12 @@ _${group}INS: ${_${group}FILES}
realinstall: installfiles
.ORDER: beforeinstall installfiles
+
+.if ${MK_STAGING} != "no"
+.if !empty(STAGE_SETS)
+buildfiles: stage_files
+.if !empty(STAGE_AS_SETS)
+buildfiles: stage_as
+.endif
+.endif
+.endif
OpenPOWER on IntegriCloud