summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.files.mk
diff options
context:
space:
mode:
authorrpaulo <rpaulo@FreeBSD.org>2013-10-25 05:11:10 +0000
committerrpaulo <rpaulo@FreeBSD.org>2013-10-25 05:11:10 +0000
commitc71fd6a1086342cf07c2400de8a101f9fc18b9b8 (patch)
tree1a5d1f63d3a8c451ab000ac4b81a1e68d115d3f6 /share/mk/bsd.files.mk
parentd6a7850e82945df69eff35b5fe945b8ee4f366e4 (diff)
downloadFreeBSD-src-c71fd6a1086342cf07c2400de8a101f9fc18b9b8.zip
FreeBSD-src-c71fd6a1086342cf07c2400de8a101f9fc18b9b8.tar.gz
Allow mixing bsd.files.mk with bsd.subdir.mk.
If a single Makefile wants to recurse into subdirectories and also wants to install files, bsd.files.mk's targets would get ignored in favor of those defined by bsd.subdir.mk because installfiles would not get defined in bsd.files.mk. Prevent this from happening by defining the targets in bsd.files.mk with auxiliary names and listing them as dependencies of installfiles instead. This is required by bsd.test.mk, which needs to install a Kyuafile in pretty much all cases but may also need to recurse into subdirectories for build purposes. Submitted by: Julio Merino jmmv google.com Reviewed by: sjg MFC after: 2 weeks
Diffstat (limited to 'share/mk/bsd.files.mk')
-rw-r--r--share/mk/bsd.files.mk8
1 files changed, 3 insertions, 5 deletions
diff --git a/share/mk/bsd.files.mk b/share/mk/bsd.files.mk
index 240f958..2397005 100644
--- a/share/mk/bsd.files.mk
+++ b/share/mk/bsd.files.mk
@@ -14,9 +14,9 @@ buildfiles: ${${group}}
all: buildfiles
-.if !target(installfiles)
.for group in ${FILESGROUPS}
.if defined(${group}) && !empty(${group})
+installfiles: installfiles-${group}
${group}OWN?= ${SHAREOWN}
${group}GRP?= ${SHAREGRP}
@@ -37,7 +37,7 @@ ${group}NAME_${file:T}?= ${${group}NAME}
.else
${group}NAME_${file:T}?= ${file:T}
.endif
-installfiles: _${group}INS_${file:T}
+installfiles-${group}: _${group}INS_${file:T}
_${group}INS_${file:T}: ${file}
${INSTALL} -o ${${group}OWN_${.ALLSRC:T}} \
-g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \
@@ -48,7 +48,7 @@ _${group}FILES+= ${file}
.endif
.endfor
.if !empty(_${group}FILES)
-installfiles: _${group}INS
+installfiles-${group}: _${group}INS
_${group}INS: ${_${group}FILES}
.if defined(${group}NAME)
${INSTALL} -o ${${group}OWN} -g ${${group}GRP} \
@@ -63,7 +63,5 @@ _${group}INS: ${_${group}FILES}
.endif # defined(${group}) && !empty(${group})
.endfor
-.endif # !target(installfiles)
-
realinstall: installfiles
.ORDER: beforeinstall installfiles
OpenPOWER on IntegriCloud