Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jan 2016 22:42:07 +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: r294354 - head/share/mk
Message-ID:  <201601192242.u0JMg78k064662@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Tue Jan 19 22:42:07 2016
New Revision: 294354
URL: https://svnweb.freebsd.org/changeset/base/294354

Log:
  bsd.subdir.mk: Allow easier modification of [STANDALONE_]SUBDIR_TARGETS.
  
  This reworks r289254 and removes ALL_SUBDIR_TARGETS.
  
  Because there is an include guard in this file there is no need for
  LOCAL_ or ?= on SUBDIR_TARGETS or STANDALONE_SUBDIR_TARGETS.  These can
  just be set via src.conf.  By the time bsd.subdir.mk is included it will
  just append the values to the existing value and work fine.  This allows
  a consistent way to append to these variables without introducing a
  LOCAL_ var for STANDALONE_SUBDIR_TARGETS or renaming the historical
  SUBDIR_TARGETS.
  
  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	Tue Jan 19 22:42:04 2016	(r294353)
+++ head/share/mk/bsd.subdir.mk	Tue Jan 19 22:42:07 2016	(r294354)
@@ -25,27 +25,30 @@
 # 		This is a variant of install, which will
 # 		put the stuff into the right "distribution".
 #
-# 	See ALL_SUBDIR_TARGETS for list of targets that will recurse.
-# 	Custom targets can be added to SUBDIR_TARGETS in src.conf.
+# 	See SUBDIR_TARGETS for list of targets that will recurse.
 #
 # 	Targets defined in STANDALONE_SUBDIR_TARGETS will always be ran
 # 	with SUBDIR_PARALLEL and will not respect .WAIT or SUBDIR_DEPEND_
 # 	values.
 #
+# 	SUBDIR_TARGETS and STANDALONE_SUBDIR_TARGETS can be appended to
+# 	via make.conf or src.conf.
+#
 
 .if !target(__<bsd.subdir.mk>__)
 __<bsd.subdir.mk>__:
 
-ALL_SUBDIR_TARGETS= all all-man buildconfig buildfiles buildincludes \
-		    checkdpadd clean cleandepend cleandir cleanilinks \
-		    cleanobj depend distribute files includes installconfig \
-		    installfiles installincludes realinstall lint maninstall \
-		    manlint obj objlink regress tags \
-		    ${SUBDIR_TARGETS}
+SUBDIR_TARGETS+= \
+		all all-man buildconfig buildfiles buildincludes \
+		checkdpadd clean cleandepend cleandir cleanilinks \
+		cleanobj depend distribute files includes installconfig \
+		installfiles installincludes realinstall lint maninstall \
+		manlint obj objlink regress tags \
 
 # Described above.
-STANDALONE_SUBDIR_TARGETS?= obj checkdpadd clean cleandepend cleandir \
-			    cleanilinks cleanobj installconfig
+STANDALONE_SUBDIR_TARGETS+= \
+		obj checkdpadd clean cleandepend cleandir \
+		cleanilinks cleanobj installconfig \
 
 .include <bsd.init.mk>
 
@@ -115,7 +118,7 @@ ${SUBDIR:N.WAIT}: .PHONY .MAKE
 	    dir=${.TARGET}; \
 	    ${_SUBDIR_SH};
 
-.for __target in ${ALL_SUBDIR_TARGETS}
+.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
@@ -154,12 +157,12 @@ ${__target}: ${__subdir_targets}
 ${__target}: _SUBDIR
 .endif	# SUBDIR_PARALLEL || _is_standalone_target
 .endif	# make(${__target})
-.endfor	# __target in ${ALL_SUBDIR_TARGETS}
+.endfor	# __target in ${SUBDIR_TARGETS}
 
 .endif	# !target(_SUBDIR)
 
 # Ensure all targets exist
-.for __target in ${ALL_SUBDIR_TARGETS}
+.for __target in ${SUBDIR_TARGETS}
 .if !target(${__target})
 ${__target}:
 .endif



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