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:
pjd 2004-06-18 16:38:42 +00:00
parent f659467d66
commit a496a13662

View File

@ -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