aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorjrm <jrm@FreeBSD.org>2017-09-17 22:20:14 +0800
committerjrm <jrm@FreeBSD.org>2017-09-17 22:20:14 +0800
commit1055ceaa0d232e59abd477e58dbd1835d92ce993 (patch)
treefb9dad1c35ab3d4f65a539ba36f19ea5904ecfb5 /Mk
parent7714fcc07080d6c158dd34753ba9c89fa2ae6718 (diff)
downloadfreebsd-ports-gnome-1055ceaa0d232e59abd477e58dbd1835d92ce993.tar.gz
freebsd-ports-gnome-1055ceaa0d232e59abd477e58dbd1835d92ce993.tar.zst
freebsd-ports-gnome-1055ceaa0d232e59abd477e58dbd1835d92ce993.zip
Ensure .CURDIR contains an absolute path without a trailing slash.
Failed builds can occur when PORTSDIR is a symbolic link, or with make -C /usr/ports/category/port/ PR: 221296 Reported by: yasu@utahime.org, rum1cro@yandex.ru Reviewed by: bdrewery, sjg Approved by: portmgr (bdrewery) Differential Revision: https://reviews.freebsd.org/D11934
Diffstat (limited to '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