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