summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.port.mk
blob: ca9f85763d055963be79a9f5b25cdcd796006da3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# $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

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

# Needed to keep bsd.own.mk from reading in /etc/src.conf
# and setting MK_* variables when building ports.
_WITHOUT_SRCCONF=

# Enable CTF conversion on request.
.if defined(WITH_CTF)
.undef NO_CTF
.endif

.include <bsd.own.mk>
.include "${BSDPORTMK}"
OpenPOWER on IntegriCloud