Author: bdrewery
Date: Wed Mar 28 16:28:20 2018
New Revision: 331682
URL: https://svnweb.freebsd.org/changeset/base/331682
Log:
Avoid upwards directory walk in kernel build for finding known SYSDIR.
Sponsored by: Dell EMC
Modified:
head/share/mk/bsd.dtb.mk
head/share/mk/bsd.kmod.mk
head/sys/conf/kmod.mk
Modified: head/share/mk/bsd.dtb.mk
==============================================================================
--- head/share/mk/bsd.dtb.mk Wed Mar 28 16:24:56 2018 (r331681)
+++ head/share/mk/bsd.dtb.mk Wed Mar 28 16:28:20 2018 (r331682)
@@ -1,6 +1,7 @@
# $FreeBSD$
# Search for kernel source tree in standard places.
+.if empty(KERNBUILDDIR)
.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \
${.CURDIR}/../../../../.. /sys /usr/src/sys
.if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk)
@@ -10,6 +11,7 @@ SYSDIR= ${_dir}
.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \
!exists(${SYSDIR}/conf/kmod.mk)
.error Unable to locate the kernel source tree. Set SYSDIR to override.
+.endif
.endif
.include "${SYSDIR}/conf/dtb.mk"
Modified: head/share/mk/bsd.kmod.mk
==============================================================================
--- head/share/mk/bsd.kmod.mk Wed Mar 28 16:24:56 2018 (r331681)
+++ head/share/mk/bsd.kmod.mk Wed Mar 28 16:28:20 2018 (r331682)
@@ -1,6 +1,7 @@
# $FreeBSD$
# Search for kernel source tree in standard places.
+.if empty(KERNBUILDDIR)
.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \
${.CURDIR}/../../../../.. /sys /usr/src/sys
.if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk)
@@ -10,6 +11,7 @@ SYSDIR= ${_dir:tA}
.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \
!exists(${SYSDIR}/conf/kmod.mk)
.error Unable to locate the kernel source tree. Set SYSDIR to override.
+.endif
.endif
.include "${SYSDIR}/conf/kmod.mk"
Modified: head/sys/conf/kmod.mk
==============================================================================
--- head/sys/conf/kmod.mk Wed Mar 28 16:24:56 2018 (r331681)
+++ head/sys/conf/kmod.mk Wed Mar 28 16:28:20 2018 (r331682)
@@ -81,6 +81,7 @@ OBJCOPY?= objcopy
.include "config.mk"
# Search for kernel source tree in standard places.
+.if empty(KERNBUILDDIR)
.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys
.if !defined(SYSDIR) && exists(${_dir}/kern/)
SYSDIR= ${_dir:tA}
@@ -88,6 +89,7 @@ SYSDIR= ${_dir:tA}
.endfor
.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/)
.error "can't find kernel source tree"
+.endif
.endif
.SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S .m
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"