Date: Tue, 20 Jun 2017 20:34:30 +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: r320171 - head/share/mk Message-ID: <201706202034.v5KKYU2F030464@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bdrewery Date: Tue Jun 20 20:34:30 2017 New Revision: 320171 URL: https://svnweb.freebsd.org/changeset/base/320171 Log: LIBADD: Try to support partial tree checkouts in some limited cases. LIBADD is only supported for in-tree builds because we do not install share/mk/src.libnames.mk (which provides LIBADD support) into /usr/share/mk. So if a partial checkout is done then the LIBADDs are ignored and no LDADD is ever added. Provide limited support for this case for when LIBADD is composed entirely of base libraries. This is to avoid clashes with ports and other out-of-tree LIBADD uses that should not be mapped to LDADD and because we do not want to support LIBADD out-of-tree right now. Reported by: mckusick, kib MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/share/mk/bsd.libnames.mk Modified: head/share/mk/bsd.libnames.mk ============================================================================== --- head/share/mk/bsd.libnames.mk Tue Jun 20 20:22:34 2017 (r320170) +++ head/share/mk/bsd.libnames.mk Tue Jun 20 20:34:30 2017 (r320171) @@ -194,4 +194,26 @@ LDADD:= ${LDADD:N-lc} -lc .for lib in ${_LIBRARIES} LIB${lib:tu}SRCDIR?= ${SRCTOP}/${LIB${lib:tu}DIR:S,^${OBJTOP}/,,} .endfor +.else + +# Out of tree builds + +# There are LIBADD defined in an out-of-tree build. Are they *all* +# in-tree libraries? If so convert them to LDADD to support +# partial checkouts. +.if !empty(LIBADD) +_convert_libadd= 1 +.for l in ${LIBADD} +.if empty(LIB${l:tu}) +_convert_libadd= 0 .endif +.endfor +.if ${_convert_libadd} == 1 +.warning Converting out-of-tree build LIBADDs into LDADD. This is not fully supported. +.for l in ${LIBADD} +LDADD+= -l${l} +.endfor +.endif +.endif + +.endif # defined(SRCTOP)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706202034.v5KKYU2F030464>