aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2014-05-11 23:22:32 +0000
committerWarner Losh <imp@FreeBSD.org>2014-05-11 23:22:32 +0000
commit8783345b6ce1fbd9bb5828cf2574642d50a169d6 (patch)
tree8ffbc499999d1a21231196d884aa4c78058c8488 /sys
parent857ce8a2465f8ac6c329282ba95e7880e19123b8 (diff)
downloadsrc-8783345b6ce1fbd9bb5828cf2574642d50a169d6.tar.gz
src-8783345b6ce1fbd9bb5828cf2574642d50a169d6.zip
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.
Notes
Notes: svn path=/head/; revision=265898
Diffstat (limited to 'sys')
-rw-r--r--sys/conf/kern.opts.mk11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/conf/kern.opts.mk b/sys/conf/kern.opts.mk
index b3ce90eaf223..6ce98917e410 100644
--- a/sys/conf/kern.opts.mk
+++ b/sys/conf/kern.opts.mk
@@ -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