Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Aug 2016 22:51:04 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r304645 - head/share/mk
Message-ID:  <201608222251.u7MMp4xZ054337@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Mon Aug 22 22:51:04 2016
New Revision: 304645
URL: https://svnweb.freebsd.org/changeset/base/304645

Log:
  Always define the various <target>_subdir_<directory> targets, even if not used.
  
  This is part of an effort to cleanup handling of some edge cases
  involving 'make <directory>'.  It also provides the targets for
  other uses.
  
  MFC after:	2 weeks
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/share/mk/bsd.subdir.mk

Modified: head/share/mk/bsd.subdir.mk
==============================================================================
--- head/share/mk/bsd.subdir.mk	Mon Aug 22 22:51:01 2016	(r304644)
+++ head/share/mk/bsd.subdir.mk	Mon Aug 22 22:51:04 2016	(r304645)
@@ -128,12 +128,6 @@ ${SUBDIR:N.WAIT}: .PHONY .MAKE
 	    ${_SUBDIR_SH};
 
 .for __target in ${SUBDIR_TARGETS}
-# Only recurse on directly-called targets.  I.e., don't recurse on dependencies
-# such as 'install' becoming {before,real,after}install, just recurse
-# 'install'.  Despite that, 'realinstall' is special due to ordering issues
-# with 'afterinstall'.
-.if !defined(NO_SUBDIR) && (make(${__target}) || \
-    (${__target} == realinstall && make(install)))
 # Can ordering be skipped for this and SUBDIR_PARALLEL forced?
 .if ${STANDALONE_SUBDIR_TARGETS:M${__target}}
 _is_standalone_target=	1
@@ -165,6 +159,14 @@ ${__target}_subdir_${DIRPRFX}${__dir}: .
 __subdir_targets+= ${__target}_subdir_${DIRPRFX}${__dir}
 .endif	# ${__dir} == .WAIT
 .endfor	# __dir in ${SUBDIR}
+
+# Attach the subdir targets to the real target.
+# Only recurse on directly-called targets.  I.e., don't recurse on dependencies
+# such as 'install' becoming {before,real,after}install, just recurse
+# 'install'.  Despite that, 'realinstall' is special due to ordering issues
+# with 'afterinstall'.
+.if !defined(NO_SUBDIR) && (make(${__target}) || \
+    (${__target} == realinstall && make(install)))
 ${__target}: ${__subdir_targets} .PHONY
 .endif	# make(${__target})
 .endfor	# __target in ${SUBDIR_TARGETS}



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