Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Apr 2018 20:27:58 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r332453 - in head: share/mk sys/conf
Message-ID:  <201804122027.w3CKRwVX032153@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Thu Apr 12 20:27:57 2018
New Revision: 332453
URL: https://svnweb.freebsd.org/changeset/base/332453

Log:
  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

Modified:
  head/share/mk/bsd.dtb.mk
  head/share/mk/bsd.kmod.mk
  head/sys/conf/kmod.mk

Modified: head/share/mk/bsd.dtb.mk
==============================================================================
--- head/share/mk/bsd.dtb.mk	Thu Apr 12 20:21:04 2018	(r332452)
+++ head/share/mk/bsd.dtb.mk	Thu Apr 12 20:27:57 2018	(r332453)
@@ -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

Modified: head/share/mk/bsd.kmod.mk
==============================================================================
--- head/share/mk/bsd.kmod.mk	Thu Apr 12 20:21:04 2018	(r332452)
+++ head/share/mk/bsd.kmod.mk	Thu Apr 12 20:27:57 2018	(r332453)
@@ -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

Modified: head/sys/conf/kmod.mk
==============================================================================
--- head/sys/conf/kmod.mk	Thu Apr 12 20:21:04 2018	(r332452)
+++ head/sys/conf/kmod.mk	Thu Apr 12 20:27:57 2018	(r332453)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804122027.w3CKRwVX032153>