1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00

component: Mk framework

Add check to detect colon in .CURDIR, because it's not supported
this patch detects the colon and shows a proper error message

Reviewed By: #portmgr, tcberner
Differential Revision: https://reviews.freebsd.org/D37500
This commit is contained in:
Luca Pizzamiglio 2023-01-11 23:31:24 +01:00
parent 6187c47ff0
commit 93a86257b7
2 changed files with 11 additions and 1 deletions

View File

@ -1058,6 +1058,11 @@ _PORTS_DIRECTORIES+= ${PKG_DBDIR} ${PREFIX} ${WRKDIR} ${EXTRACT_WRKDIR} \
# make -C /usr/ports/category/port/.
.CURDIR:= ${.CURDIR:tA}
# Ensure .CURDIR doesn't contain a colon, which breaks makefile targets
.if ${.CURDIR:S/:/\:/g} != ${.CURDIR}
.error The current directory path contains ':', this is not supported
.endif
# make sure bmake treats -V as expected
.MAKE.EXPAND_VARIABLES= yes

View File

@ -51,6 +51,11 @@ MOVEDFILE?= MOVED
# make -C /usr/ports/category/port/.
.CURDIR:= ${.CURDIR:tA}
# Ensure .CURDIR doesn't contain a colon, which breaks makefile targets
.if ${.CURDIR:S/:/\:/g} != ${.CURDIR}
.error The current directory path contains ':', this is not supported
.endif
.include "${PORTSDIR}/Mk/bsd.commands.mk"
.MAIN: all
@ -505,7 +510,7 @@ _PORTSEARCH= \
} \
}' ${MOVEDDIR}/${MOVEDFILE}; \
fi \
fi
fi
search:
@${_PORTSEARCH}