From df3394b3de0c40cae69e46b795dc794db3a80c2e Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Mon, 11 Aug 2014 14:50:49 +0000 Subject: Remove dependence on source tree options. Move all kernel module options into kern.opts.mk and change all the places where we use src.opts.mk to pull in the options. Conditionally define SYSDIR and use SYSDIR/conf/kern.opts.mk instead of a CURDIR path. Replace all instances of CURDIR/../../etc with STSDIR, but only in the affected files. As a special compatibility hack, include bsd.owm.mk at the top of kern.opts.mk to allow the bare build of sys/modules to work on older systems. If the defaults ever change between 9.x, 10.x and current for these options, however, you'll wind up with the host OS' defaults rather than the -current defaults. This hack will be removed when we no longer need to support this build scenario. Reviewed by: jhb Differential Revision: https://phabric.freebsd.org/D529 --- sys/modules/netgraph/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/modules/netgraph') diff --git a/sys/modules/netgraph/Makefile b/sys/modules/netgraph/Makefile index cccbd656c151..c9b5748a7b4b 100644 --- a/sys/modules/netgraph/Makefile +++ b/sys/modules/netgraph/Makefile @@ -1,7 +1,8 @@ # $Whistle: Makefile,v 1.5 1999/01/24 06:48:37 archie Exp $ # $FreeBSD$ -.include +SYSDIR?=${.CURDIR}/../.. +.include "${SYSDIR}/conf/kern.opts.mk" SUBDIR= async \ atm \ @@ -57,7 +58,7 @@ SUBDIR= async \ _bluetooth= bluetooth .endif -.if ${MK_CRYPT} != "no" && exists(${.CURDIR}/../../crypto/rc4/rc4.c) +.if ${MK_CRYPT} != "no" && exists(${SYSDIR}/crypto/rc4/rc4.c) _mppc= mppc .endif -- cgit v1.3