From owner-svn-src-head@FreeBSD.ORG Sat May 17 20:31:35 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4F40FC6; Sat, 17 May 2014 20:31:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1A4324D0; Sat, 17 May 2014 20:31:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HKVZx0073893; Sat, 17 May 2014 20:31:35 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4HKVY51073386; Sat, 17 May 2014 20:31:34 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201405172031.s4HKVY51073386@svn.freebsd.org> From: Warner Losh Date: Sat, 17 May 2014 20:31:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r266349 - in head: share/mk sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 20:31:35 -0000 Author: imp Date: Sat May 17 20:31:34 2014 New Revision: 266349 URL: http://svnweb.freebsd.org/changeset/base/266349 Log: The time is not yet ripe to break the lack of dependencies between src/sys and the rest of the tree for builds. o eliminate including bsd.mkopts.mk for the moment in kern.opts.mk o No need to include src.opts.mk at all anymore. The reasons for it are now coverted in sys.mk and src.sys.mk. Modified: head/share/mk/src.sys.mk head/sys/conf/kern.opts.mk head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk Modified: head/share/mk/src.sys.mk ============================================================================== --- head/share/mk/src.sys.mk Sat May 17 20:22:22 2014 (r266348) +++ head/share/mk/src.sys.mk Sat May 17 20:31:34 2014 (r266349) @@ -1,7 +1,13 @@ # $FreeBSD$ +# Note: This file is also duplicated in the sys/conf/kern.pre.mk so +# it will always grab SRCCONF, even if it isn't being built in-tree +# to preserve historical (and useful) behavior. Changes here need to +# be reflected there so SRCCONF isn't included multiple times. + # Allow user to configure things that only effect src tree builds. SRCCONF?= /etc/src.conf -.if exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf" +.if (exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf") && !target(_srcconf_included_) .include "${SRCCONF}" +_srcconf_included_: .endif Modified: head/sys/conf/kern.opts.mk ============================================================================== --- head/sys/conf/kern.opts.mk Sat May 17 20:22:22 2014 (r266348) +++ head/sys/conf/kern.opts.mk Sat May 17 20:31:34 2014 (r266349) @@ -19,17 +19,15 @@ __DEFAULT_YES_OPTIONS = \ FORMAT_EXTENSIONS \ KERNEL_SYMBOLS -__DEFAULT_NO_OPTIONS = \ +# expanded inline from bsd.mkopt.mk: -# Kludge to allow a less painful transition. If MAKESYSPATH isn't defined, -# assume we have a standard FreeBSD src tree layout and reach over and grab -# bsd.mkopt.mk from there. If it is defined, trust it to point someplace sane -# and include bsd.mkopt.mk from there. We need the !defined case to keep ports -# kernel modules working (though arguably they should define MAKESYSPATH). We -# need the latter case to keep the Jenkins testing harness working where they -# specifically use a non-standard layout, but do define MAKESYSPATH correctly. -.if !defined(MAKESYSPATH) -.include "../../share/mk/bsd.mkopt.mk" +.for var in ${__DEFAULT_YES_OPTIONS} +.if !defined(MK_${var}) +.if defined(WITHOUT_${var}) # WITHOUT always wins +MK_${var}:= no .else -.include +MK_${var}:= yes .endif +.endif +.endfor +.undef __DEFAULT_YES_OPTIONS Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Sat May 17 20:22:22 2014 (r266348) +++ head/sys/conf/kern.pre.mk Sat May 17 20:31:34 2014 (r266349) @@ -3,7 +3,19 @@ # Part of a unified Makefile for building kernels. This part contains all # of the definitions that need to be before %BEFORE_DEPEND. -.include +# Allow user to configure things that only effect src tree builds. +# Note: This is duplicated from src.sys.mk to ensure that we include +# /etc/src.conf when building the kernel. Kernels can be built without +# the rest of /usr/src, but they still always process SRCCONF even though +# the normal mechanisms to prevent that (compiling out of tree) won't +# work. To ensure they do work, we have to duplicate thee few lines here. +SRCCONF?= /etc/src.conf +.if (exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf") && !target(_srcconf_included_) +.include "${SRCCONF}" +_srcconf_included_: +.endif + +.include .include .include "kern.opts.mk" Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Sat May 17 20:22:22 2014 (r266348) +++ head/sys/conf/kmod.mk Sat May 17 20:31:34 2014 (r266349) @@ -65,15 +65,10 @@ KMODLOAD?= /sbin/kldload KMODUNLOAD?= /sbin/kldunload OBJCOPY?= objcopy -# Note: we're really bsd.kmod.mk, so we have to allow src.opts.mk to be -# optional. Include it if we can so we can get /etc/src.conf changes, -# if we're in the tree. If we can't include it that's OK. kern.opts.mk -# has all the kernel options in it, and should be included after src.opts.mk -# so it picks everything up. -.sinclude +# Grab all the options for a kernel build. +.include "kern.opts.mk" .include .include -.include "kern.opts.mk" .SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S