summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.port.subdir.mk
blob: bdf07d549e5dbaa875877d0edfc507d5e8763f1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# $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.
.if exists(${.CURDIR}/Mk/bsd.port.mk)
PORTSDIR=	${.CURDIR}
.elif exists(${.CURDIR}/../Mk/bsd.port.mk)
PORTSDIR=	${.CURDIR}/..
.elif exists(${.CURDIR}/../../Mk/bsd.port.mk)
PORTSDIR=	${.CURDIR}/../..
.elif exists(${.CURDIR}/../../../Mk/bsd.port.mk)
PORTSDIR=	${.CURDIR}/../../..
.else
PORTSDIR=	/usr/ports
.endif
.endif

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

.include "${BSDPORTSUBDIRMK}"
OpenPOWER on IntegriCloud