Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Dec 2015 07:54:19 +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: r291751 - head/share/mk
Message-ID:  <201512040754.tB47sJpj027995@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Fri Dec  4 07:54:19 2015
New Revision: 291751
URL: https://svnweb.freebsd.org/changeset/base/291751

Log:
  Fix 'install*' and many other missing targets with DIRDEPS_BUILD.
  
  My changes in r291635 broke 'make install*' for DIRDEPS_BUILD but also
  revealed that some other targets were not guaranteed to be created if
  there was a SUBDIR defined.  One example is 'installfiles' was never
  defined if SUBDIR was not empty.
  
  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	Fri Dec  4 07:54:16 2015	(r291750)
+++ head/share/mk/bsd.subdir.mk	Fri Dec  4 07:54:19 2015	(r291751)
@@ -56,12 +56,6 @@ STANDALONE_SUBDIR_TARGETS?= obj checkdpa
 _SUBDIR:
 .endif
 .endif
-.if !target(_SUBDIR)
-
-.if defined(SUBDIR)
-SUBDIR:=${SUBDIR} ${SUBDIR.yes}
-SUBDIR:=${SUBDIR:u}
-.endif
 
 DISTRIBUTION?=	base
 .if !target(distribute)
@@ -93,6 +87,14 @@ install:	beforeinstall realinstall after
 .ORDER:		beforeinstall realinstall afterinstall
 .endif
 
+# SUBDIR recursing may be disabled for MK_DIRDEPS_BUILD
+.if !target(_SUBDIR)
+
+.if defined(SUBDIR)
+SUBDIR:=${SUBDIR} ${SUBDIR.yes}
+SUBDIR:=${SUBDIR:u}
+.endif
+
 # Subdir code shared among 'make <subdir>', 'make <target>' and SUBDIR_PARALLEL.
 _SUBDIR_SH=	\
 		if test -d ${.CURDIR}/$${dir}.${MACHINE_ARCH}; then \
@@ -151,11 +153,16 @@ ${__target}: ${__subdir_targets}
 .else
 ${__target}: _SUBDIR
 .endif	# SUBDIR_PARALLEL || _is_standalone_target
-.elif !target(${__target})
-${__target}:
 .endif	# make(${__target})
 .endfor	# __target in ${ALL_SUBDIR_TARGETS}
 
 .endif	# !target(_SUBDIR)
 
+# Ensure all targets exist
+.for __target in ${ALL_SUBDIR_TARGETS}
+.if !target(${__target})
+${__target}:
+.endif
+.endfor
+
 .endif



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