aboutsummaryrefslogtreecommitdiff
path: root/Mk/bsd.port.mk
diff options
context:
space:
mode:
authorJoseph Mingrone <jrm@FreeBSD.org>2017-09-17 14:20:14 +0000
committerJoseph Mingrone <jrm@FreeBSD.org>2017-09-17 14:20:14 +0000
commit212ed26ec988ab9948de26d6cf87eb1a08e2d7e5 (patch)
treefb9dad1c35ab3d4f65a539ba36f19ea5904ecfb5 /Mk/bsd.port.mk
parent8405b6357b0aef010940224aaaad3696a6dd0e00 (diff)
downloadports-212ed26ec988ab9948de26d6cf87eb1a08e2d7e5.tar.gz
ports-212ed26ec988ab9948de26d6cf87eb1a08e2d7e5.zip
Notes
Diffstat (limited to 'Mk/bsd.port.mk')
-rw-r--r--Mk/bsd.port.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 52f80436b0c9..b7aa5340acd0 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -1061,6 +1061,11 @@ MINIMAL_PKG_VERSION= 1.6.0
_PORTS_DIRECTORIES+= ${PKG_DBDIR} ${PREFIX} ${WRKDIR} ${EXTRACT_WRKDIR} \
${STAGEDIR}${PREFIX} ${WRKDIR}/pkg
+# Ensure .CURDIR contains an absolute path without a trailing slash. Failed
+# builds can occur when PORTSDIR is a symbolic link, or with something like
+# make -C /usr/ports/category/port/.
+.CURDIR:= ${.CURDIR:tA}
+
# make sure bmake treats -V as expected
.MAKE.EXPAND_VARIABLES= yes