Check if ${_dir}/kern exists as well, because if it doesn't exists
we will fail later and we can miss good kernel source tree directory. I found this trying to compile kld module and it finds 'conf/kmod.mk' in '../..', but it fails later, because there is no 'kern' directory, but there is valid kernel source tree still in /usr/src/sys/.
This commit is contained in:
parent
f659467d66
commit
a496a13662
@ -2,7 +2,7 @@
|
||||
|
||||
# Search for kernel source tree in standard places.
|
||||
.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. /sys /usr/src/sys
|
||||
.if !defined(SYSDIR) && exists(${_dir}/conf/kmod.mk)
|
||||
.if !defined(SYSDIR) && exists(${_dir}/kern) && exists(${_dir}/conf/kmod.mk)
|
||||
SYSDIR= ${_dir}
|
||||
.endif
|
||||
.endfor
|
||||
|
Loading…
Reference in New Issue
Block a user