Date: Thu, 21 Nov 2019 18:14:26 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r354970 - in head: share/mk sys/conf Message-ID: <201911211814.xALIEQuA094706@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Thu Nov 21 18:14:26 2019 New Revision: 354970 URL: https://svnweb.freebsd.org/changeset/base/354970 Log: Add a kmod.opts.mk. This Makefile sets KERN_OPTS. This permits kernel module Makefiles to use KERN_OPTS to control the value of variables such as SRCS that are used by bsd.kmod.mk for KERN_OPTS values that honor WITH/WITHOUT options for standalone builds. Added: head/share/mk/kmod.opts.mk (contents, props changed) head/sys/conf/kmod.opts.mk (contents, props changed) Modified: head/sys/conf/kmod.mk Added: head/share/mk/kmod.opts.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/mk/kmod.opts.mk Thu Nov 21 18:14:26 2019 (r354970) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +.include <bsd.sysdir.mk> +.include "${SYSDIR}/conf/kmod.opts.mk" Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Thu Nov 21 16:42:25 2019 (r354969) +++ head/sys/conf/kmod.mk Thu Nov 21 18:14:26 2019 (r354970) @@ -73,12 +73,7 @@ KMODUNLOAD?= /sbin/kldunload KMODISLOADED?= /sbin/kldstat -q -n OBJCOPY?= objcopy -.include <bsd.init.mk> -# Grab all the options for a kernel build. For backwards compat, we need to -# do this after bsd.own.mk. -.include "kern.opts.mk" -.include <bsd.compiler.mk> -.include "config.mk" +.include "kmod.opts.mk" .include <bsd.sysdir.mk> .SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S .m Added: head/sys/conf/kmod.opts.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/conf/kmod.opts.mk Thu Nov 21 18:14:26 2019 (r354970) @@ -0,0 +1,16 @@ +# $FreeBSD$ +# +# Handle options (KERN_OPTS) for kernel module options. This can be included earlier in a kmod Makefile +# to allow KERN_OPTS to control SRCS, etc. + +.if !target(__<kmod.opts.mk>__) +__<kmod.opts.mk>__: + +.include <bsd.init.mk> +# Grab all the options for a kernel build. For backwards compat, we need to +# do this after bsd.own.mk. +.include "kern.opts.mk" +.include <bsd.compiler.mk> +.include "config.mk" + +.endif # !target(__<kmod.opts.mk>__)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911211814.xALIEQuA094706>