From owner-svn-src-all@freebsd.org Tue Dec 15 03:40:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8117DA432C8; Tue, 15 Dec 2015 03:40:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3813F1299; Tue, 15 Dec 2015 03:40:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tBF2p5MD055675; Tue, 15 Dec 2015 02:51:05 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBF2p5xW055674; Tue, 15 Dec 2015 02:51:05 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512150251.tBF2p5xW055674@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 15 Dec 2015 02:51:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292243 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Dec 2015 03:40:06 -0000 Author: bdrewery Date: Tue Dec 15 02:51:05 2015 New Revision: 292243 URL: https://svnweb.freebsd.org/changeset/base/292243 Log: DIRDEPS_BUILD: Support bootstrapping from PROGS.(DPADD|LIBADD). Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/local.dirdeps.mk Modified: head/share/mk/local.dirdeps.mk ============================================================================== --- head/share/mk/local.dirdeps.mk Tue Dec 15 02:46:14 2015 (r292242) +++ head/share/mk/local.dirdeps.mk Tue Dec 15 02:51:05 2015 (r292243) @@ -129,14 +129,28 @@ DIRDEPS+= lib/msun .if !empty(SRCS:M*.y) DIRDEPS+= usr.bin/yacc.host .endif +# Gather PROGS dependencies +.if !empty(PROGS) +_PROGS_LIBADD= +_PROGS_DPADD= +.for _prog in ${PROGS} +.if !empty(LIBADD.${_prog}) +_PROGS_LIBADD+= ${LIBADD.${_prog}} +.endif +.if !empty(DPADD.${_prog}) +_PROGS_DPADD+= ${DPADD.${_prog}} +.endif +.endfor +.endif # !empty(PROGS) .if !empty(DPADD) # Taken from meta.autodep.mk (where it only does something with # BUILD_AT_LEVEL0, which we don't use). # This only works for DPADD with full OBJ/SRC paths, which is mostly just # _INTERNALLIBS. +_DPADD= ${DPADD} ${_PROGS_DPADD} _DP_DIRDEPS= \ - ${DPADD:M${OBJTOP}*:H:N.:tA:C,${OBJTOP}[^/]*/,,:N.:O:u} \ - ${DPADD:M${OBJROOT}*:N${OBJTOP}*:N${STAGE_ROOT}/*:H:S,${OBJROOT},,:C,^([^/]+)/(.*),\2.\1,:S,${HOST_TARGET}$,host,:N.*:O:u} + ${_DPADD:O:u:M${OBJTOP}*:H:N.:tA:C,${OBJTOP}[^/]*/,,:N.:O:u} \ + ${_DPADD:O:u:M${OBJROOT}*:N${OBJTOP}*:N${STAGE_ROOT}/*:H:S,${OBJROOT},,:C,^([^/]+)/(.*),\2.\1,:S,${HOST_TARGET}$,host,:N.*:O:u} # Resolve the paths to RELDIRs .if !empty(_DP_DIRDEPS) DIRDEPS+= ${_DP_DIRDEPS:C,^,${SRCTOP}/,:tA:C,^${SRCTOP}/,,} @@ -144,7 +158,8 @@ DIRDEPS+= ${_DP_DIRDEPS:C,^,${SRCTOP}/,: .endif # !empty(DPADD) .if !empty(LIBADD) # Also handle LIBADD for non-internal libraries. -.for _lib in ${LIBADD} +_ALL_LIBADD= ${LIBADD} ${_PROGS_LIBADD} +.for _lib in ${_ALL_LIBADD:O:u} _lib${_lib}reldir= ${LIB${_lib:tu}DIR:C,${OBJTOP}/,,} .if defined(LIB${_lib:tu}DIR) && ${DIRDEPS:M${_lib${_lib}reldir}} == "" && \ exists(${SRCTOP}/${_lib${_lib}reldir})