Avoid looping if SYSDIR already known.
Sponsored by: Dell EMC
This commit is contained in:
parent
3a6475b51b
commit
4ef3ada558
@ -2,12 +2,14 @@
|
||||
|
||||
# Search for kernel source tree in standard places.
|
||||
.if empty(KERNBUILDDIR)
|
||||
.if !defined(SYSDIR)
|
||||
.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \
|
||||
${.CURDIR}/../../../../.. /sys /usr/src/sys
|
||||
.if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk)
|
||||
.if exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk)
|
||||
SYSDIR= ${_dir}
|
||||
.endif
|
||||
.endfor
|
||||
.endif
|
||||
.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \
|
||||
!exists(${SYSDIR}/conf/kmod.mk)
|
||||
.error Unable to locate the kernel source tree. Set SYSDIR to override.
|
||||
|
@ -2,12 +2,14 @@
|
||||
|
||||
# Search for kernel source tree in standard places.
|
||||
.if empty(KERNBUILDDIR)
|
||||
.if !defined(SYSDIR)
|
||||
.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \
|
||||
${.CURDIR}/../../../../.. /sys /usr/src/sys
|
||||
.if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk)
|
||||
.if exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk)
|
||||
SYSDIR= ${_dir:tA}
|
||||
.endif
|
||||
.endfor
|
||||
.endif
|
||||
.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \
|
||||
!exists(${SYSDIR}/conf/kmod.mk)
|
||||
.error Unable to locate the kernel source tree. Set SYSDIR to override.
|
||||
|
@ -82,11 +82,13 @@ OBJCOPY?= objcopy
|
||||
|
||||
# Search for kernel source tree in standard places.
|
||||
.if empty(KERNBUILDDIR)
|
||||
.if !defined(SYSDIR)
|
||||
.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys
|
||||
.if !defined(SYSDIR) && exists(${_dir}/kern/)
|
||||
.if exists(${_dir}/kern/)
|
||||
SYSDIR= ${_dir:tA}
|
||||
.endif
|
||||
.endfor
|
||||
.endif
|
||||
.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/)
|
||||
.error "can't find kernel source tree"
|
||||
.endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user