summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.kmod.mk
diff options
context:
space:
mode:
authorjasone <jasone@FreeBSD.org>2000-12-08 20:36:32 +0000
committerjasone <jasone@FreeBSD.org>2000-12-08 20:36:32 +0000
commitffce1c840d1991590e43beda230efca6a1058dd1 (patch)
tree634a4d25dbe60749e9f3684f6b910b703522b7bf /share/mk/bsd.kmod.mk
parentc3f2ee9700d0fed2b3e547667a6c907d938f10ed (diff)
downloadFreeBSD-src-ffce1c840d1991590e43beda230efca6a1058dd1.zip
FreeBSD-src-ffce1c840d1991590e43beda230efca6a1058dd1.tar.gz
Do not check for existence of ${_dir}/kern/ , because for modules that set
.PATH to ${.CURDIR}/[...]/kern , the "exists" expression will fail for the form exists(${.CURDIR}/[...]/kern/). This appears to be happening because make is searching for the argument to "exists" by using .PATH rather than a relative search, because .PATH and the argument match at the beginning. Additionally, make appears to consider a path that starts with ${.CURDIR} as relative, even though it expands to an absolute path. The reason that most people aren't seeing this problem is that the absolute paths of /usr/src/sys and /sys are also searched, so as long as the kernel source can be found in at least one of those places, no problems surface. This problem was inadvertently introduced on 1 December 2000, with the addition of the sysvipc modules.
Diffstat (limited to 'share/mk/bsd.kmod.mk')
-rw-r--r--share/mk/bsd.kmod.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/share/mk/bsd.kmod.mk b/share/mk/bsd.kmod.mk
index 3056daa..73f9c14 100644
--- a/share/mk/bsd.kmod.mk
+++ b/share/mk/bsd.kmod.mk
@@ -2,11 +2,11 @@
# Search for kernel source tree in standard places.
.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. /sys /usr/src/sys
-.if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/)
+.if !defined(SYSDIR) && exists(${_dir}/conf/kmod.mk)
SYSDIR= ${_dir}
.endif
.endfor
-.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || !exists(${SYSDIR}/conf/)
+.if !defined(SYSDIR) || !exists(${SYSDIR}/kern) || !exists(${SYSDIR}/conf/)
.error "can't find kernel source tree"
.endif
OpenPOWER on IntegriCloud