Avoid upwards directory walk in kernel build for finding known SYSDIR.
Sponsored by: Dell EMC
This commit is contained in:
parent
dbb4ba297b
commit
ffae081b1e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=331682
@ -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)
|
||||
@ -11,6 +12,7 @@ SYSDIR= ${_dir}
|
||||
!exists(${SYSDIR}/conf/kmod.mk)
|
||||
.error Unable to locate the kernel source tree. Set SYSDIR to override.
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.include "${SYSDIR}/conf/dtb.mk"
|
||||
|
||||
|
@ -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)
|
||||
@ -11,5 +12,6 @@ SYSDIR= ${_dir:tA}
|
||||
!exists(${SYSDIR}/conf/kmod.mk)
|
||||
.error Unable to locate the kernel source tree. Set SYSDIR to override.
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.include "${SYSDIR}/conf/kmod.mk"
|
||||
|
@ -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}
|
||||
@ -89,6 +90,7 @@ SYSDIR= ${_dir:tA}
|
||||
.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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user