aboutsummaryrefslogtreecommitdiff
path: root/share/mk/bsd.libnames.mk
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2015-12-01 22:19:17 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2015-12-01 22:19:17 +0000
commitde52e5bdca088414f71d5faecfd7ccb42b4988d1 (patch)
tree5805c37c38cf94f2d945bfb3e7ba1f29e8c7e0c6 /share/mk/bsd.libnames.mk
parent62f38e94ec2778eea39a2c26a07376baac3ac33e (diff)
downloadsrc-de52e5bdca088414f71d5faecfd7ccb42b4988d1.tar.gz
src-de52e5bdca088414f71d5faecfd7ccb42b4988d1.zip
Define a LIB*SRCDIR for all known _LIBRARIES.
This is a follow-up to r291327 which added a LIB*DIR for all known _LIBRARIES. Sponsored by: EMC / Isilon Storage Division
Notes
Notes: svn path=/head/; revision=291619
Diffstat (limited to 'share/mk/bsd.libnames.mk')
-rw-r--r--share/mk/bsd.libnames.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/share/mk/bsd.libnames.mk b/share/mk/bsd.libnames.mk
index a3b0e2500837..0165b466832a 100644
--- a/share/mk/bsd.libnames.mk
+++ b/share/mk/bsd.libnames.mk
@@ -152,3 +152,11 @@ LDADD:= ${LDADD:N-lpthread} -lpthread
LDADD:= ${LDADD:N-lc} -lc
.endif
.endif
+
+# Only do this for src builds.
+.if defined(SRCTOP)
+# Derive LIB*SRCDIR from LIB*DIR
+.for lib in ${_LIBRARIES}
+LIB${lib:tu}SRCDIR?= ${SRCTOP}/${LIB${lib:tu}DIR:S,^${OBJTOP}/,,}
+.endfor
+.endif