From owner-svn-src-head@freebsd.org Fri Dec 4 03:17:25 2015 Return-Path: Delivered-To: svn-src-head@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 9133BA40C69; Fri, 4 Dec 2015 03:17:25 +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 40C541E85; Fri, 4 Dec 2015 03:17:25 +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 tB43HOA2047361; Fri, 4 Dec 2015 03:17:24 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB43HOUJ047360; Fri, 4 Dec 2015 03:17:24 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512040317.tB43HOUJ047360@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 03:17:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291737 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 03:17:25 -0000 Author: bdrewery Date: Fri Dec 4 03:17:24 2015 New Revision: 291737 URL: https://svnweb.freebsd.org/changeset/base/291737 Log: Rework unknown LIBADD assertion to be more clear and to not suggest adding DPADD/LDADD_ variables that are a special case. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Fri Dec 4 03:17:21 2015 (r291736) +++ head/share/mk/src.libnames.mk Fri Dec 4 03:17:24 2015 (r291737) @@ -329,14 +329,10 @@ DPADD_atf_cxx+= ${DPADD_atf_c} LDADD_atf_cxx+= ${LDADD_atf_c} .for _l in ${LIBADD} -DPADD+= ${DPADD_${_l}:Umissing-dpadd_${_l}} +DPADD+= ${DPADD_${_l}} LDADD+= ${LDADD_${_l}} .endfor -.if defined(DPADD) && ${DPADD:Mmissing-dpadd_*} -.error ${.CURDIR}: Missing ${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//:S/^/DPADD_/} variable add "${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//}" to _LIBRARIES, _INTERNALLIBS, or _PRIVATELIBS and define "${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//:S/^/LIB/:tu}". -.endif - # INTERNALLIB definitions. LIBELFTCDIR= ${OBJTOP}/lib/libelftc LIBELFTC?= ${LIBELFTCDIR}/libelftc.a @@ -463,6 +459,16 @@ LIBLNDIR= ${OBJTOP}/usr.bin/lex/lib LIB${lib:tu}DIR?= ${OBJTOP}/lib/lib${lib} .endfor +# Validate that listed LIBADD are valid. +.for _l in ${LIBADD} +.if empty(_LIBRARIES:M${_l}) +_BADLIBADD+= ${_l} +.endif +.endfor +.if !empty(_BADLIBADD) +.error ${.CURDIR}: Invalid LIBADD used which may need to be added to ${_this:T}: ${_BADLIBADD} +.endif + # Sanity check that libraries are defined here properly when building them. .if defined(LIB) && ${_LIBRARIES:M${LIB}} != "" .if !empty(LIBADD) && \