2a6acc2651
Reported by: madpilot Reviewed by: bapt X-MFC-With: 272282
23 lines
647 B
Makefile
23 lines
647 B
Makefile
# $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!= realpath ${.CURDIR}
|
|
.elif exists(${.CURDIR}/../Mk/bsd.port.mk)
|
|
PORTSDIR!= realpath ${.CURDIR}/..
|
|
.elif exists(${.CURDIR}/../../Mk/bsd.port.mk)
|
|
PORTSDIR!= realpath ${.CURDIR}/../..
|
|
.elif exists(${.CURDIR}/../../../Mk/bsd.port.mk)
|
|
PORTSDIR!= realpath ${.CURDIR}/../../..
|
|
.else
|
|
PORTSDIR= /usr/ports
|
|
.endif
|
|
.endif
|
|
|
|
BSDPORTSUBDIRMK?= ${PORTSDIR}/Mk/bsd.port.subdir.mk
|
|
|
|
.include "${BSDPORTSUBDIRMK}"
|