2000-12-29 01:23:57 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2014-09-29 15:05:23 +00:00
|
|
|
.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.
|
2014-10-01 20:52:08 +00:00
|
|
|
.for RELPATH in . .. ../.. ../../..
|
|
|
|
.if !defined(_PORTSDIR) && exists(${.CURDIR}/${RELPATH}/Mk/bsd.port.mk)
|
|
|
|
_PORTSDIR= ${.CURDIR}/${RELPATH}
|
2014-09-29 15:05:23 +00:00
|
|
|
.endif
|
2014-10-01 20:52:08 +00:00
|
|
|
.endfor
|
|
|
|
_PORTSDIR?= /usr/ports
|
2015-09-03 17:01:58 +00:00
|
|
|
.if defined(.PARSEDIR)
|
|
|
|
PORTSDIR= ${_PORTSDIR:tA}
|
|
|
|
.else # fmake doesn't have :tA
|
2014-10-01 20:52:08 +00:00
|
|
|
PORTSDIR!= realpath ${_PORTSDIR}
|
2014-09-29 15:05:23 +00:00
|
|
|
.endif
|
2015-09-03 17:01:58 +00:00
|
|
|
.endif
|
2014-09-29 15:05:23 +00:00
|
|
|
|
2004-07-02 20:47:18 +00:00
|
|
|
BSDPORTSUBDIRMK?= ${PORTSDIR}/Mk/bsd.port.subdir.mk
|
2002-04-19 07:43:50 +00:00
|
|
|
|
2004-07-02 20:47:18 +00:00
|
|
|
.include "${BSDPORTSUBDIRMK}"
|