diff options
author | John Baldwin <jhb@FreeBSD.org> | 2009-05-04 20:25:56 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2009-05-04 20:25:56 +0000 |
commit | 8859442e76a9155996f0eab362a88e1ffd9c30be (patch) | |
tree | 85c1c284c4fffcf5a8560528c39ab2e57c7f7bef | |
parent | 84a8cad0f605effaf96a207e0c8d2f6a9a77dbbd (diff) | |
download | src-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.mk | 4 |
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} |