Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Dec 2015 03:17:59 +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: r291739 - head/share/mk
Message-ID:  <201512040317.tB43Hxlx047540@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Fri Dec  4 03:17:59 2015
New Revision: 291739
URL: https://svnweb.freebsd.org/changeset/base/291739

Log:
  Add assertion for when LIBADD should be used rather than LDADD/DPADD.
  
  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:47 2015	(r291738)
+++ head/share/mk/src.libnames.mk	Fri Dec  4 03:17:59 2015	(r291739)
@@ -328,6 +328,16 @@ LDADD_${_l}+=	${LDADD_${_d}}
 DPADD_atf_cxx+=	${DPADD_atf_c}
 LDADD_atf_cxx+=	${LDADD_atf_c}
 
+# Detect LDADD/DPADD that should be LIBADD, before modifying LDADD here.
+.for _l in ${LDADD:M-l*:N-l*/*:C,^-l,,}
+.if ${_LIBRARIES:M${_l}}
+_BADLDADD+=	${_l}
+.endif
+.endfor
+.if !empty(_BADLDADD)
+.error ${.CURDIR}: These libraries should be LIBADD+=foo rather than DPADD/LDADD+=-lfoo: ${_BADLDADD}
+.endif
+
 .for _l in ${LIBADD}
 DPADD+=		${DPADD_${_l}}
 LDADD+=		${LDADD_${_l}}



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