summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorjmmv <jmmv@FreeBSD.org>2014-06-09 14:36:49 +0000
committerjmmv <jmmv@FreeBSD.org>2014-06-09 14:36:49 +0000
commit12a7a792952c2b9d5937ed180b55073879c7aa93 (patch)
treecf1ecd4a1c83d28dab9d789b23f13519fc671aa4 /share
parent20dd7d19969dd412d730a011d0c0c3d7a126f42b (diff)
downloadFreeBSD-src-12a7a792952c2b9d5937ed180b55073879c7aa93.zip
FreeBSD-src-12a7a792952c2b9d5937ed180b55073879c7aa93.tar.gz
Ensure files are created during the build when using bsd.subdir.mk.
When FILES is defined in a Makefile that _also_ includes bsd.subdir.mk, the build of the files (if any) was not properly triggered during the build stage. This was because bsd.files.mk did not define the buildfiles target if it was already defined... and bsd.subdir.mk defined this target on its own, thus causing a conflict. Fix this by unconditionally defining buildfiles from bsd.files.mk; this is safe because nothing else in the tree needs to redefine this and because the target itself contains no commands: all it does is define dependencies. Also ensure that bsd.files.mk is always pulled in by bsd.test.mk regardless of what bsd.prog.mk does. These fixes allow "make installworld" to run cleanly on a system with read-only src and obj trees. This is "make tinderbox" clean. Reviewed by: imp Obtained from: jilles
Diffstat (limited to 'share')
-rw-r--r--share/mk/bsd.files.mk7
-rw-r--r--share/mk/bsd.test.mk3
2 files changed, 6 insertions, 4 deletions
diff --git a/share/mk/bsd.files.mk b/share/mk/bsd.files.mk
index 2397005..4178fbc 100644
--- a/share/mk/bsd.files.mk
+++ b/share/mk/bsd.files.mk
@@ -4,13 +4,14 @@
.error bsd.files.mk cannot be included directly.
.endif
+.if !target(__<bsd.files.mk>__)
+__<bsd.files.mk>__:
+
FILESGROUPS?= FILES
-.if !target(buildfiles)
.for group in ${FILESGROUPS}
buildfiles: ${${group}}
.endfor
-.endif
all: buildfiles
@@ -65,3 +66,5 @@ _${group}INS: ${_${group}FILES}
realinstall: installfiles
.ORDER: beforeinstall installfiles
+
+.endif # !target(__<bsd.files.mk>__)
diff --git a/share/mk/bsd.test.mk b/share/mk/bsd.test.mk
index 3399303..4060677 100644
--- a/share/mk/bsd.test.mk
+++ b/share/mk/bsd.test.mk
@@ -82,8 +82,7 @@ test: aftertest
.if !empty(PROGS) || !empty(PROGS_CXX) || !empty(SCRIPTS)
.include <bsd.progs.mk>
-.elif !empty(FILES)
-.include <bsd.files.mk>
.endif
+.include <bsd.files.mk>
.include <bsd.obj.mk>
OpenPOWER on IntegriCloud