From owner-svn-src-all@freebsd.org Thu Nov 21 15:59:35 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 313E71C35D7; Thu, 21 Nov 2019 15:59:35 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47JklW0WXRz4b2K; Thu, 21 Nov 2019 15:59:35 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EA658DA82; Thu, 21 Nov 2019 15:59:34 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xALFxYU9012519; Thu, 21 Nov 2019 15:59:34 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xALFxXQa012513; Thu, 21 Nov 2019 15:59:33 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201911211559.xALFxXQa012513@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 21 Nov 2019 15:59:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r354968 - in head: share/mk sys/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: share/mk sys/conf X-SVN-Commit-Revision: 354968 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Nov 2019 15:59:35 -0000 Author: imp Date: Thu Nov 21 15:59:33 2019 New Revision: 354968 URL: https://svnweb.freebsd.org/changeset/base/354968 Log: Introduce bsd.sysdir.mk to consolidate looking for the kernel. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D22144 Added: head/share/mk/bsd.sysdir.mk - copied, changed from r354937, head/share/mk/bsd.kmod.mk Modified: head/share/mk/bsd.dtb.mk head/share/mk/bsd.kmod.mk head/sys/conf/dtb.build.mk head/sys/conf/kmod.mk Modified: head/share/mk/bsd.dtb.mk ============================================================================== --- head/share/mk/bsd.dtb.mk Thu Nov 21 15:54:56 2019 (r354967) +++ head/share/mk/bsd.dtb.mk Thu Nov 21 15:59:33 2019 (r354968) @@ -1,22 +1,6 @@ # $FreeBSD$ -# Search for kernel source tree in standard places. -.if empty(KERNBUILDDIR) -.if !defined(SYSDIR) -.for _dir in ${SRCTOP:D${SRCTOP}/sys} \ - ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \ - ${.CURDIR}/../../../../.. /sys /usr/src/sys -.if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk) -SYSDIR= ${_dir} -.endif -.endfor -.endif -.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 .include "${SYSDIR}/conf/dtb.mk" .include Modified: head/share/mk/bsd.kmod.mk ============================================================================== --- head/share/mk/bsd.kmod.mk Thu Nov 21 15:54:56 2019 (r354967) +++ head/share/mk/bsd.kmod.mk Thu Nov 21 15:59:33 2019 (r354968) @@ -1,20 +1,4 @@ # $FreeBSD$ -# Search for kernel source tree in standard places. -.if empty(KERNBUILDDIR) -.if !defined(SYSDIR) -.for _dir in ${SRCTOP:D${SRCTOP}/sys} \ - ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \ - ${.CURDIR}/../../../../.. /sys /usr/src/sys -.if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk) -SYSDIR= ${_dir:tA} -.endif -.endfor -.endif -.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 .include "${SYSDIR}/conf/kmod.mk" Copied and modified: head/share/mk/bsd.sysdir.mk (from r354937, head/share/mk/bsd.kmod.mk) ============================================================================== --- head/share/mk/bsd.kmod.mk Thu Nov 21 06:48:30 2019 (r354937, copy source) +++ head/share/mk/bsd.sysdir.mk Thu Nov 21 15:59:33 2019 (r354968) @@ -1,7 +1,6 @@ # $FreeBSD$ # Search for kernel source tree in standard places. -.if empty(KERNBUILDDIR) .if !defined(SYSDIR) .for _dir in ${SRCTOP:D${SRCTOP}/sys} \ ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \ @@ -15,6 +14,3 @@ SYSDIR= ${_dir:tA} !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/dtb.build.mk ============================================================================== --- head/sys/conf/dtb.build.mk Thu Nov 21 15:54:56 2019 (r354967) +++ head/sys/conf/dtb.build.mk Thu Nov 21 15:59:33 2019 (r354968) @@ -11,12 +11,7 @@ DTC?= dtc .if defined(S) SYSDIR= ${S} .else -# Search for kernel source tree in standard places. -.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys -.if exists(${_dir}/kern/) -SYSDIR= ${_dir:tA} -.endif -.endfor +.include .endif # defined(S) .endif # defined(SYSDIR) Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Thu Nov 21 15:54:56 2019 (r354967) +++ head/sys/conf/kmod.mk Thu Nov 21 15:59:33 2019 (r354968) @@ -79,21 +79,7 @@ OBJCOPY?= objcopy .include "kern.opts.mk" .include .include "config.mk" - -# Search for kernel source tree in standard places. -.if empty(KERNBUILDDIR) -.if !defined(SYSDIR) -.for _dir in ${SRCTOP:D${SRCTOP}/sys} \ - ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys -.if !defined(SYSDIR) && exists(${_dir}/kern/) -SYSDIR= ${_dir:tA} -.endif -.endfor -.endif -.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) -.error "can't find kernel source tree" -.endif -.endif +.include .SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S .m