diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2015-12-04 03:17:24 +0000 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2015-12-04 03:17:24 +0000 |
commit | b4e7db0cc3b11e52de66259e19d2bf84d0bfb9c2 (patch) | |
tree | a2a19e8b59e6ff8666bcc436783666f56bdb00cb /share/mk | |
parent | 8848e16c2f516ce44b78e3178fdbfadd3db9bb2d (diff) | |
download | FreeBSD-src-b4e7db0cc3b11e52de66259e19d2bf84d0bfb9c2.zip FreeBSD-src-b4e7db0cc3b11e52de66259e19d2bf84d0bfb9c2.tar.gz |
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
Diffstat (limited to 'share/mk')
-rw-r--r-- | share/mk/src.libnames.mk | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index a0f9e9b..ef3cf50 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -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) && \ |