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
This commit is contained in:
parent
84a8cad0f6
commit
8859442e76
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user