aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2009-05-04 20:25:56 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2009-05-04 20:25:56 +0000
commit8859442e76a9155996f0eab362a88e1ffd9c30be (patch)
tree85c1c284c4fffcf5a8560528c39ab2e57c7f7bef
parent84a8cad0f605effaf96a207e0c8d2f6a9a77dbbd (diff)
downloadsrc-8859442e76a9155996f0eab362a88e1ffd9c30be.tar.gz
src-8859442e76a9155996f0eab362a88e1ffd9c30be.zip
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
Notes
Notes: svn path=/head/; revision=191794
-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 f0dd6fd67012..ed565686391c 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}