xref: /freebsd/share/mk/bsd.port.mk (revision 5a4b548ab2460be5f456b2e4fe91bfc21d53862b)
1e36a59f7SPeter Wemm
2a0dec793SWill Andrews.if !defined(PORTSDIR)
3a0dec793SWill Andrews# Autodetect if the command is being run in a ports tree that's not rooted
4a0dec793SWill Andrews# in the default /usr/ports.  The ../../.. case is in case ports ever grows
5a0dec793SWill Andrews# a third level.
66cc777bfSWill Andrews.for RELPATH in . .. ../.. ../../..
76cc777bfSWill Andrews.if !defined(_PORTSDIR) && exists(${.CURDIR}/${RELPATH}/Mk/bsd.port.mk)
86cc777bfSWill Andrews_PORTSDIR=	${.CURDIR}/${RELPATH}
9a0dec793SWill Andrews.endif
106cc777bfSWill Andrews.endfor
116cc777bfSWill Andrews_PORTSDIR?=	/usr/ports
12*880c41baSBryan DreweryPORTSDIR=	${_PORTSDIR:tA}
13*880c41baSBryan Drewery.endif
14a0dec793SWill Andrews
154a209e39SOliver EikemeierBSDPORTMK?=	${PORTSDIR}/Mk/bsd.port.mk
16abd41f7dSRuslan Ermilov
178ef03c79SRuslan Ermilov# Needed to keep bsd.own.mk from reading in /etc/src.conf
188ef03c79SRuslan Ermilov# and setting MK_* variables when building ports.
198ef03c79SRuslan Ermilov_WITHOUT_SRCCONF=
20489ffb71SDavid E. O'Brien
2121edb039SAlexander Leidinger# Enable CTF conversion on request.
2221edb039SAlexander Leidinger.if defined(WITH_CTF)
2321edb039SAlexander Leidinger.undef NO_CTF
2421edb039SAlexander Leidinger.endif
2521edb039SAlexander Leidinger
26abd41f7dSRuslan Ermilov.include <bsd.own.mk>
274a209e39SOliver Eikemeier.include "${BSDPORTMK}"
28