From 28d09f6c088f73690fb82e3fb1941fe68615a610 Mon Sep 17 00:00:00 2001 From: ngie Date: Tue, 30 Dec 2014 20:44:05 +0000 Subject: MFC r267276: 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 --- share/mk/bsd.files.mk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'share/mk/bsd.files.mk') 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(____) +____: + 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(____) -- cgit v1.1