svn commit: r289282 - head/share/mk

Bryan Drewery bdrewery at FreeBSD.org
Wed Oct 14 02:37:32 UTC 2015


Author: bdrewery
Date: Wed Oct 14 02:37:30 2015
New Revision: 289282
URL: https://svnweb.freebsd.org/changeset/base/289282

Log:
  Replace the out-of-place includes/files/config handling in bsd.subdir.mk with
  more typical ALL_SUBDIR_TARGETS entries and target hooks in bsd.incs.mk,
  bsd.files.mk and bsd.confs.mk.
  
  This allows the targets to be NOPs if unneeded and still work with the
  shortcut 'make includes' to build and then install in a parallel-safe manner.
  
  Sort and re-indent the ALL_SUBDIR_TARGETS with the new entries.
  
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/share/mk/bsd.confs.mk
  head/share/mk/bsd.files.mk
  head/share/mk/bsd.incs.mk
  head/share/mk/bsd.subdir.mk

Modified: head/share/mk/bsd.confs.mk
==============================================================================
--- head/share/mk/bsd.confs.mk	Wed Oct 14 02:14:45 2015	(r289281)
+++ head/share/mk/bsd.confs.mk	Wed Oct 14 02:37:30 2015	(r289282)
@@ -84,4 +84,7 @@ STAGE_TARGETS+= stage_config
 .endif
 .endif
 
+config: buildconfig installconfig
+.ORDER: buildconfig installconfig
+
 .endif # ${MK_INCLUDES} != "no"

Modified: head/share/mk/bsd.files.mk
==============================================================================
--- head/share/mk/bsd.files.mk	Wed Oct 14 02:14:45 2015	(r289281)
+++ head/share/mk/bsd.files.mk	Wed Oct 14 02:37:30 2015	(r289282)
@@ -94,4 +94,7 @@ buildfiles: stage_as
 .endif
 .endif
 
+files: buildfiles installfiles
+.ORDER: buildfiles installfiles
+
 .endif # !target(__<bsd.files.mk>__)

Modified: head/share/mk/bsd.incs.mk
==============================================================================
--- head/share/mk/bsd.incs.mk	Wed Oct 14 02:14:45 2015	(r289281)
+++ head/share/mk/bsd.incs.mk	Wed Oct 14 02:37:30 2015	(r289282)
@@ -99,4 +99,7 @@ STAGE_SYMLINKS.INCS= ${INCSLINKS}
 .endif
 .endif
 
+includes: buildincludes installincludes
+.ORDER: buildincludes installincludes
+
 .endif # ${MK_INCLUDES} != "no"

Modified: head/share/mk/bsd.subdir.mk
==============================================================================
--- head/share/mk/bsd.subdir.mk	Wed Oct 14 02:14:45 2015	(r289281)
+++ head/share/mk/bsd.subdir.mk	Wed Oct 14 02:37:30 2015	(r289282)
@@ -32,9 +32,12 @@
 .if !target(__<bsd.subdir.mk>__)
 __<bsd.subdir.mk>__:
 
-ALL_SUBDIR_TARGETS= all all-man checkdpadd clean cleandepend cleandir \
-	cleanilinks cleanobj depend distribute lint maninstall manlint obj \
-	objlink realinstall regress tags ${SUBDIR_TARGETS}
+ALL_SUBDIR_TARGETS= all all-man buildconfig buildfiles buildincludes \
+		    checkdpadd clean cleandepend cleandir cleanilinks \
+		    cleanobj config depend distribute files includes \
+		    installconfig installfiles installincludes lint \
+		    maninstall manlint obj objlink realinstall regress tags \
+		    ${SUBDIR_TARGETS}
 
 .include <bsd.init.mk>
 
@@ -123,23 +126,6 @@ _sub.${__target}: _SUBDIR
 .endif
 .endfor
 
-# This is to support 'make includes' calling 'make buildincludes' and
-# 'make installincludes' in the proper order, and to support these
-# targets as SUBDIR_TARGETS.
-.for __target in files includes config
-.for __stage in build install
-${__stage}${__target}:
-.if make(${__stage}${__target})
-${__stage}${__target}: _sub.${__stage}${__target}
-_sub.${__stage}${__target}: _SUBDIR
-.endif
-.endfor
-.if !target(${__target})
-${__target}: .MAKE
-	${_+_}cd ${.CURDIR}; ${MAKE} build${__target}; ${MAKE} install${__target}
-.endif
-.endfor
-
 .endif
 
 .if !target(install)


More information about the svn-src-all mailing list