Date: Wed, 28 Mar 2018 16:28:20 +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: r331682 - in head: share/mk sys/conf Message-ID: <201803281628.w2SGSKPa056658@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bdrewery Date: Wed Mar 28 16:28:20 2018 New Revision: 331682 URL: https://svnweb.freebsd.org/changeset/base/331682 Log: Avoid upwards directory walk in kernel build for finding known SYSDIR. 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 Wed Mar 28 16:24:56 2018 (r331681) +++ head/share/mk/bsd.dtb.mk Wed Mar 28 16:28:20 2018 (r331682) @@ -1,6 +1,7 @@ # $FreeBSD$ # Search for kernel source tree in standard places. +.if empty(KERNBUILDDIR) .for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \ ${.CURDIR}/../../../../.. /sys /usr/src/sys .if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk) @@ -10,6 +11,7 @@ SYSDIR= ${_dir} .if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \ !exists(${SYSDIR}/conf/kmod.mk) .error Unable to locate the kernel source tree. Set SYSDIR to override. +.endif .endif .include "${SYSDIR}/conf/dtb.mk" Modified: head/share/mk/bsd.kmod.mk ============================================================================== --- head/share/mk/bsd.kmod.mk Wed Mar 28 16:24:56 2018 (r331681) +++ head/share/mk/bsd.kmod.mk Wed Mar 28 16:28:20 2018 (r331682) @@ -1,6 +1,7 @@ # $FreeBSD$ # Search for kernel source tree in standard places. +.if empty(KERNBUILDDIR) .for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \ ${.CURDIR}/../../../../.. /sys /usr/src/sys .if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk) @@ -10,6 +11,7 @@ SYSDIR= ${_dir:tA} .if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \ !exists(${SYSDIR}/conf/kmod.mk) .error Unable to locate the kernel source tree. Set SYSDIR to override. +.endif .endif .include "${SYSDIR}/conf/kmod.mk" Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Wed Mar 28 16:24:56 2018 (r331681) +++ head/sys/conf/kmod.mk Wed Mar 28 16:28:20 2018 (r331682) @@ -81,6 +81,7 @@ OBJCOPY?= objcopy .include "config.mk" # Search for kernel source tree in standard places. +.if empty(KERNBUILDDIR) .for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys .if !defined(SYSDIR) && exists(${_dir}/kern/) SYSDIR= ${_dir:tA} @@ -88,6 +89,7 @@ SYSDIR= ${_dir:tA} .endfor .if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) .error "can't find kernel source tree" +.endif .endif .SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S .m
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803281628.w2SGSKPa056658>