summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.files.mk
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2015-06-15 10:56:01 +0000
committerbapt <bapt@FreeBSD.org>2015-06-15 10:56:01 +0000
commit35a6f0a11cfe0d26a30bdbedec91a5d1f245d073 (patch)
tree38be19927629e894dac83d7490eda1567d530cb9 /share/mk/bsd.files.mk
parent03d84058c3a2a1f69cd43d180104c0cee5dc3920 (diff)
parent1f7642cc6f9e7a88f2e1524cbafc9b64fcff56f8 (diff)
downloadFreeBSD-src-35a6f0a11cfe0d26a30bdbedec91a5d1f245d073.zip
FreeBSD-src-35a6f0a11cfe0d26a30bdbedec91a5d1f245d073.tar.gz
Merge from head
Diffstat (limited to 'share/mk/bsd.files.mk')
-rw-r--r--share/mk/bsd.files.mk22
1 files changed, 22 insertions, 0 deletions
diff --git a/share/mk/bsd.files.mk b/share/mk/bsd.files.mk
index 7d0770a..fd8850f 100644
--- a/share/mk/bsd.files.mk
+++ b/share/mk/bsd.files.mk
@@ -23,6 +23,11 @@ ${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}
+STAGE_SYMLINKS_DIR.${group}= ${STAGE_OBJTOP}
.if defined(NO_ROOT)
.if !defined(${group}TAGS) || ! ${${group}TAGS:Mpackage=*}
@@ -46,6 +51,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}: _${group}INS_${file:T}
_${group}INS_${file:T}: ${file}
${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN_${.ALLSRC:T}} \
@@ -57,6 +68,8 @@ _${group}FILES+= ${file}
.endif
.endfor
.if !empty(_${group}FILES)
+stage_files.${group}: ${_${group}FILES}
+
installfiles-${group}: _${group}INS
_${group}INS: ${_${group}FILES}
.if defined(${group}NAME)
@@ -75,4 +88,13 @@ _${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
+
.endif # !target(__<bsd.files.mk>__)
OpenPOWER on IntegriCloud