]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
Replace the out-of-place includes/files/config handling in bsd.subdir.mk with
authorbdrewery <bdrewery@FreeBSD.org>
Wed, 14 Oct 2015 02:37:30 +0000 (02:37 +0000)
committerbdrewery <bdrewery@FreeBSD.org>
Wed, 14 Oct 2015 02:37:30 +0000 (02:37 +0000)
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

share/mk/bsd.confs.mk
share/mk/bsd.files.mk
share/mk/bsd.incs.mk
share/mk/bsd.subdir.mk

index 0750a4e4fa579d951c3f213f01791636c256d9a5..bcc36bc18e6fd102b342afb87d67e4c7cd8d1f0e 100644 (file)
@@ -84,4 +84,7 @@ STAGE_TARGETS+= stage_config
 .endif
 .endif
 
+config: buildconfig installconfig
+.ORDER: buildconfig installconfig
+
 .endif # ${MK_INCLUDES} != "no"
index b9379d92b59a3cdba3dd046a5b4ee445d6a156a5..d1d3263c4444eda7eb7e8e9fee589d33e5c56274 100644 (file)
@@ -94,4 +94,7 @@ buildfiles: stage_as
 .endif
 .endif
 
+files: buildfiles installfiles
+.ORDER: buildfiles installfiles
+
 .endif # !target(__<bsd.files.mk>__)
index e1398c95dcd107a8c9ef87c7c192ca097cb69b9d..c985668c7c4bdd7cec2b87379582f7a564d231bb 100644 (file)
@@ -99,4 +99,7 @@ STAGE_SYMLINKS.INCS= ${INCSLINKS}
 .endif
 .endif
 
+includes: buildincludes installincludes
+.ORDER: buildincludes installincludes
+
 .endif # ${MK_INCLUDES} != "no"
index 8afe40a693b0dfbf8a843ec03bc10d53b3935f0a..e4c3e69d1c27c72a606e22a225a496089b143013 100644 (file)
 .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)