From owner-svn-src-head@FreeBSD.ORG Fri May 9 21:11:28 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7AB11FE; Fri, 9 May 2014 21:11:28 +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 6785C6B3; Fri, 9 May 2014 21:11:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s49LBS6Z079406; Fri, 9 May 2014 21:11:28 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s49LBRMm079402; Fri, 9 May 2014 21:11:27 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201405092111.s49LBRMm079402@svn.freebsd.org> From: Warner Losh Date: Fri, 9 May 2014 21:11:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r265785 - 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: Fri, 09 May 2014 21:11:28 -0000 Author: imp Date: Fri May 9 21:11:27 2014 New Revision: 265785 URL: http://svnweb.freebsd.org/changeset/base/265785 Log: Introduce kern.opts.mk to hold all the options for kernel module builds. Include this in the right places. Make src.opts.mk optional so that modules can be built outside of the tree in the ports system. PR: 189520 Added: head/sys/conf/kern.opts.mk (contents, props changed) Modified: head/share/mk/src.opts.mk head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Fri May 9 19:14:34 2014 (r265784) +++ head/share/mk/src.opts.mk Fri May 9 21:11:27 2014 (r265785) @@ -24,7 +24,7 @@ # # Makefiles should never test WITH_FOO or WITHOUT_FOO directly (although an # exception is made for _WITHOUT_SRCONF which turns off this mechanism -# completely). +# completely inside bsd.*.mk files). # .if !target(____) @@ -84,7 +84,6 @@ __DEFAULT_YES_OPTIONS = \ FDT \ FLOPPY \ FMTREE \ - FORMAT_EXTENSIONS \ FORTH \ FP_LIBC \ FREEBSD_UPDATE \ @@ -105,7 +104,6 @@ __DEFAULT_YES_OPTIONS = \ IPFW \ JAIL \ KDUMP \ - KERNEL_SYMBOLS \ KVM \ LDNS \ LDNS_UTILS \ Added: head/sys/conf/kern.opts.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/conf/kern.opts.mk Fri May 9 21:11:27 2014 (r265785) @@ -0,0 +1,24 @@ +# $FreeBSD$ + +# Options set in the build system that affect the kernel somehow. + +# +# Define MK_* variables (which are either "yes" or "no") for users +# to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the +# make(1) environment. +# These should be tested with `== "no"' or `!= "no"' in makefiles. +# The NO_* variables should only be set by makefiles for variables +# that haven't been converted over. +# + +# These options are used by the kernel build process (kern.mk and kmod.mk) +# They have to be listed here so we can build modules outside of the +# src tree. + +__DEFAULT_YES_OPTIONS = \ + FORMAT_EXTENTIONS \ + KERNEL_SYMBOLS + +__DEFAULT_NO_OPTIONS = \ + +.include "../../share/mk/bsd.mkopt.mk" Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Fri May 9 19:14:34 2014 (r265784) +++ head/sys/conf/kern.pre.mk Fri May 9 21:11:27 2014 (r265785) @@ -5,6 +5,7 @@ .include .include +.include "kern.opts.mk" # backwards compat option for older systems. MACHINE_CPUARCH?=${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/} Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Fri May 9 19:14:34 2014 (r265784) +++ head/sys/conf/kmod.mk Fri May 9 21:11:27 2014 (r265785) @@ -72,9 +72,15 @@ OBJCOPY?= objcopy .error "Do not use KMODDEPS on 5.0+; use MODULE_VERSION/MODULE_DEPEND" .endif -.include +# 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 .include .include +.include "kern.opts.mk" .SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S