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
This commit is contained in:
parent
e979979acf
commit
711c77093c
@ -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}
|
||||
.endif
|
||||
.endfor
|
||||
|
@ -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
|
||||
|
@ -84,7 +84,7 @@ OBJCOPY?= objcopy
|
||||
.if empty(KERNBUILDDIR)
|
||||
.if !defined(SYSDIR)
|
||||
.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys
|
||||
.if exists(${_dir}/kern/)
|
||||
.if !defined(SYSDIR) && exists(${_dir}/kern/)
|
||||
SYSDIR= ${_dir:tA}
|
||||
.endif
|
||||
.endfor
|
||||
|
Loading…
x
Reference in New Issue
Block a user