xref: /freebsd/share/mk/bsd.port.mk (revision 6b129086dcee14496517fae085b448e3edc69bc7)
1# $FreeBSD$
2
3.if !defined(PORTSDIR)
4# Autodetect if the command is being run in a ports tree that's not rooted
5# in the default /usr/ports.  The ../../.. case is in case ports ever grows
6# a third level.
7.for RELPATH in . .. ../.. ../../..
8.if !defined(_PORTSDIR) && exists(${.CURDIR}/${RELPATH}/Mk/bsd.port.mk)
9_PORTSDIR=	${.CURDIR}/${RELPATH}
10.endif
11.endfor
12_PORTSDIR?=	/usr/ports
13PORTSDIR!=	realpath ${_PORTSDIR}
14.endif
15
16BSDPORTMK?=	${PORTSDIR}/Mk/bsd.port.mk
17
18# Needed to keep bsd.own.mk from reading in /etc/src.conf
19# and setting MK_* variables when building ports.
20_WITHOUT_SRCCONF=
21
22# Enable CTF conversion on request.
23.if defined(WITH_CTF)
24.undef NO_CTF
25.endif
26
27.include <bsd.own.mk>
28.include "${BSDPORTMK}"
29