summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.port.subdir.mk
blob: 8e608a127aa712dbbc7219f68daf1f5172b46c65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# $FreeBSD$

.if !defined(PORTSDIR)
# Autodetect if the command is being run in a ports tree that's not rooted
# in the default /usr/ports.  The ../../.. case is in case ports ever grows
# a third level.
.for RELPATH in . .. ../.. ../../..
.if !defined(_PORTSDIR) && exists(${.CURDIR}/${RELPATH}/Mk/bsd.port.mk)
_PORTSDIR=	${.CURDIR}/${RELPATH}
.endif
.endfor
_PORTSDIR?=	/usr/ports
PORTSDIR!=	realpath ${_PORTSDIR}
.endif

BSDPORTSUBDIRMK?=	${PORTSDIR}/Mk/bsd.port.subdir.mk

.include "${BSDPORTSUBDIRMK}"
OpenPOWER on IntegriCloud