svn commit: r291737 - head/share/mk
Bryan Drewery
bdrewery at FreeBSD.org
Fri Dec 4 03:17:25 UTC 2015
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_<foo> 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) && \
More information about the svn-src-head
mailing list