aboutsummaryrefslogtreecommitdiff
path: root/share/mk/bsd.kmod.mk
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2018-04-12 20:27:57 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2018-04-12 20:27:57 +0000
commit711c77093c0e0af994b04500fd4c4636987df42d (patch)
treeabc2c3f8366c2378718f3858badbc5d1756e820a /share/mk/bsd.kmod.mk
parente979979acfba14606930fd24a6198152e775cc04 (diff)
downloadsrc-711c77093c0e0af994b04500fd4c4636987df42d.tar.gz
src-711c77093c0e0af994b04500fd4c4636987df42d.zip
Fix using wrong SYSDIR after r331683.
This was inadvertently overriding the first found SYSDIR with the last of /usr/src which could result in the wrong headers being used if not building from /usr/src. SYSDIR?= is not used here to avoid evaluating the exists() when unneeded. Reported by: rgrimes, sjg, Mark Millard Pointyhat to: bdrewery Sponsored by: Dell EMC
Notes
Notes: svn path=/head/; revision=332453
Diffstat (limited to 'share/mk/bsd.kmod.mk')
-rw-r--r--share/mk/bsd.kmod.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/share/mk/bsd.kmod.mk b/share/mk/bsd.kmod.mk
index 8c71c952fa35..f754254b21bb 100644
--- a/share/mk/bsd.kmod.mk
+++ b/share/mk/bsd.kmod.mk
@@ -5,7 +5,7 @@
.if !defined(SYSDIR)
.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \
${.CURDIR}/../../../../.. /sys /usr/src/sys
-.if exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk)
+.if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk)
SYSDIR= ${_dir:tA}
.endif
.endfor