summaryrefslogtreecommitdiffstats
path: root/sys/conf
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2009-05-04 20:25:56 +0000
committerjhb <jhb@FreeBSD.org>2009-05-04 20:25:56 +0000
commit7c0aa0054b8976fc87d345f93733c546e12b7fd2 (patch)
tree85c1c284c4fffcf5a8560528c39ab2e57c7f7bef /sys/conf
parent9fea2e998c515cc5dcef8bee1186db14536f30eb (diff)
downloadFreeBSD-src-7c0aa0054b8976fc87d345f93733c546e12b7fd2.zip
FreeBSD-src-7c0aa0054b8976fc87d345f93733c546e12b7fd2.tar.gz
Always compute the root of the kernel source tree and explicitly pass it
to module builds. This avoids having to have the module builds walk up the tree to find the kernel sources. It also allows a kernel + module build to succeed when a new level of module subdirectories is added without requiring that the /usr/share/mk/bsd.kmod.mk file on the machine be patched. MFC after: 1 week
Diffstat (limited to 'sys/conf')
-rw-r--r--sys/conf/kern.post.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk
index f0dd6fd..ed56568 100644
--- a/sys/conf/kern.post.mk
+++ b/sys/conf/kern.post.mk
@@ -12,7 +12,8 @@
.if defined(DESTDIR)
MKMODULESENV+= DESTDIR="${DESTDIR}"
.endif
-MKMODULESENV+= KERNBUILDDIR="${.CURDIR}"
+SYSDIR?= ${S:C;^[^/];${.CURDIR}/&;}
+MKMODULESENV+= KERNBUILDDIR="${.CURDIR}" SYSDIR="${SYSDIR}"
.MAIN: all
@@ -29,7 +30,6 @@ modules-${target}:
# Handle out of tree ports
.if !defined(NO_MODULES) && defined(PORTS_MODULES)
-SYSDIR?= ${S:C;^[^/];${.CURDIR}/&;}
PORTSMODULESENV=SYSDIR=${SYSDIR}
.for __target in all install reinstall clean
${__target}: ports-${__target}
OpenPOWER on IntegriCloud