Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Jun 2014 14:36:49 +0000 (UTC)
From:      Julio Merino <jmmv@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r267276 - head/share/mk
Message-ID:  <201406091436.s59EanPI044946@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jmmv
Date: Mon Jun  9 14:36:49 2014
New Revision: 267276
URL: http://svnweb.freebsd.org/changeset/base/267276

Log:
  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

Modified:
  head/share/mk/bsd.files.mk
  head/share/mk/bsd.test.mk

Modified: head/share/mk/bsd.files.mk
==============================================================================
--- head/share/mk/bsd.files.mk	Mon Jun  9 14:34:33 2014	(r267275)
+++ head/share/mk/bsd.files.mk	Mon Jun  9 14:36:49 2014	(r267276)
@@ -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>__)

Modified: head/share/mk/bsd.test.mk
==============================================================================
--- head/share/mk/bsd.test.mk	Mon Jun  9 14:34:33 2014	(r267275)
+++ head/share/mk/bsd.test.mk	Mon Jun  9 14:36:49 2014	(r267276)
@@ -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>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406091436.s59EanPI044946>