From 1055ceaa0d232e59abd477e58dbd1835d92ce993 Mon Sep 17 00:00:00 2001 From: jrm Date: Sun, 17 Sep 2017 14:20:14 +0000 Subject: 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 --- Mk/bsd.port.mk | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Mk') 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 -- cgit