Attempt to walk a fine line between current usage (/usr/ports which

does an out-of-tree build without setting MAKESYSPATH) and recently
added requirements (JIRA's building the modules in a non-standard
layout). So, when MAKESYSPATH is defined, trust that it will do the
right thing (to catch the JIRA use case). When it isn't defined,
assume a standard FreeBSD tree and reach over to grab bsd.mkopt.mk (to
fix the /usr/ports use case). Both camps cannot be appeased otherwise,
so we have this kludge until it can be sorted out.
This commit is contained in:
Warner Losh 2014-05-11 23:22:32 +00:00
parent 857ce8a246
commit 8783345b6c

View File

@ -21,4 +21,15 @@ __DEFAULT_YES_OPTIONS = \
__DEFAULT_NO_OPTIONS = \
# Kludge to allow a less painful transition. If MAKESYSPATH isn't defined,
# assume we have a standard FreeBSD src tree layout and reach over and grab
# bsd.mkopt.mk from there. If it is defined, trust it to point someplace sane
# and include bsd.mkopt.mk from there. We need the !defined case to keep ports
# kernel modules working (though arguably they should define MAKESYSPATH). We
# need the latter case to keep the JIRA case working where they specifically
# use a non-standard layout, but do define MAKESYSPATH correctly.
.if !defined(MAKESYSPATH)
.include "../../share/mk/bsd.mkopt.mk"
.else
.include <bsd.mkopt.mk>
.endif