summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2015-10-14 19:30:04 +0000
committerbdrewery <bdrewery@FreeBSD.org>2015-10-14 19:30:04 +0000
commit2606e8ae5cfe7009393b115c804e527fdc834c66 (patch)
tree3471f3973ef09cacda09204a7640b19189e55e6d /share
parentd70c586bb85ddc1f7dac37ec85544b169e6b4b6e (diff)
downloadFreeBSD-src-2606e8ae5cfe7009393b115c804e527fdc834c66.zip
FreeBSD-src-2606e8ae5cfe7009393b115c804e527fdc834c66.tar.gz
Revert r289282 for now as the interaction with a directory containing
bsd.files.mk and bsd.subdir.mk is recursing too many times.
Diffstat (limited to 'share')
-rw-r--r--share/mk/bsd.confs.mk3
-rw-r--r--share/mk/bsd.files.mk3
-rw-r--r--share/mk/bsd.incs.mk3
-rw-r--r--share/mk/bsd.subdir.mk26
4 files changed, 20 insertions, 15 deletions
diff --git a/share/mk/bsd.confs.mk b/share/mk/bsd.confs.mk
index bcc36bc..0750a4e 100644
--- a/share/mk/bsd.confs.mk
+++ b/share/mk/bsd.confs.mk
@@ -84,7 +84,4 @@ STAGE_TARGETS+= stage_config
.endif
.endif
-config: buildconfig installconfig
-.ORDER: buildconfig installconfig
-
.endif # ${MK_INCLUDES} != "no"
diff --git a/share/mk/bsd.files.mk b/share/mk/bsd.files.mk
index d1d3263..b9379d9 100644
--- a/share/mk/bsd.files.mk
+++ b/share/mk/bsd.files.mk
@@ -94,7 +94,4 @@ buildfiles: stage_as
.endif
.endif
-files: buildfiles installfiles
-.ORDER: buildfiles installfiles
-
.endif # !target(__<bsd.files.mk>__)
diff --git a/share/mk/bsd.incs.mk b/share/mk/bsd.incs.mk
index c985668..e1398c9 100644
--- a/share/mk/bsd.incs.mk
+++ b/share/mk/bsd.incs.mk
@@ -99,7 +99,4 @@ STAGE_SYMLINKS.INCS= ${INCSLINKS}
.endif
.endif
-includes: buildincludes installincludes
-.ORDER: buildincludes installincludes
-
.endif # ${MK_INCLUDES} != "no"
diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk
index e4c3e69..8afe40a 100644
--- a/share/mk/bsd.subdir.mk
+++ b/share/mk/bsd.subdir.mk
@@ -32,12 +32,9 @@
.if !target(__<bsd.subdir.mk>__)
__<bsd.subdir.mk>__:
-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}
+ALL_SUBDIR_TARGETS= all all-man checkdpadd clean cleandepend cleandir \
+ cleanilinks cleanobj depend distribute lint maninstall manlint obj \
+ objlink realinstall regress tags ${SUBDIR_TARGETS}
.include <bsd.init.mk>
@@ -126,6 +123,23 @@ _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)
OpenPOWER on IntegriCloud