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

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

Log:
  Fix 'afterinstall' order not being respected after my changes in r291635.
  
  The problem was that 'afterinstall' was not coming after SUBDIRs were
  installed which was the expectation at least in sys/modules for kldxref.
  
  Reported by:	np
  Pointyhat to:	bdrewery
  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:04 2015	(r291748)
+++ head/share/mk/bsd.subdir.mk	Fri Dec  4 07:54:13 2015	(r291749)
@@ -39,7 +39,7 @@ __<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 install lint maninstall \
+		    installfiles installincludes realinstall lint maninstall \
 		    manlint obj objlink regress tags \
 		    ${SUBDIR_TARGETS}
 
@@ -104,7 +104,7 @@ _SUBDIR_SH=	\
 
 _SUBDIR: .USEBEFORE
 .if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR)
-	@${_+_}target=${.TARGET}; \
+	@${_+_}target=${.TARGET:realinstall=install}; \
 	    for dir in ${SUBDIR:N.WAIT}; do ( ${_SUBDIR_SH} ); done
 .endif
 
@@ -118,8 +118,9 @@ __wait= .WAIT
 .for __target in ${ALL_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'.
-.if make(${__target})
+# 'install'.  Despite that, 'realinstall' is special due to ordering issues
+# with 'afterinstall'.
+.if make(${__target}) || (${__target} == realinstall && make(install))
 # Can ordering be skipped for this and SUBDIR_PARALLEL forced?
 .if ${STANDALONE_SUBDIR_TARGETS:M${__target}}
 _is_standalone_target=	1
@@ -142,7 +143,7 @@ __deps+= ${__target}_subdir_${__dep}
 .endif
 ${__target}_subdir_${__dir}: .PHONY .MAKE ${__deps}
 .if !defined(NO_SUBDIR)
-	@${_+_}target=${__target}; \
+	@${_+_}target=${__target:realinstall=install}; \
 	    dir=${__dir}; \
 	    ${_SUBDIR_SH};
 .endif



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