svn commit: r291739 - head/share/mk
Bryan Drewery
bdrewery at FreeBSD.org
Fri Dec 4 03:18:01 UTC 2015
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}}
More information about the svn-src-head
mailing list