From owner-svn-src-head@FreeBSD.ORG Fri Nov 14 21:10:46 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF3AF332; Fri, 14 Nov 2014 21:10:46 +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 BB9C515F; Fri, 14 Nov 2014 21:10:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAELAkjU056944; Fri, 14 Nov 2014 21:10:46 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAELAkHs056942; Fri, 14 Nov 2014 21:10:46 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201411142110.sAELAkHs056942@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 14 Nov 2014 21:10:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274529 - in head/sys: conf modules/if_gif 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-1 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, 14 Nov 2014 21:10:46 -0000 Author: imp Date: Fri Nov 14 21:10:45 2014 New Revision: 274529 URL: https://svnweb.freebsd.org/changeset/base/274529 Log: Automate options INET/INET6 turning into MK_$opt_SUPPORT correctly. Fixes if_gfe when building without INET6 and simplifies if_gif's Makefile. Sponsored by: Netflix, Inc Modified: head/sys/conf/kern.opts.mk head/sys/modules/if_gif/Makefile Modified: head/sys/conf/kern.opts.mk ============================================================================== --- head/sys/conf/kern.opts.mk Fri Nov 14 21:08:51 2014 (r274528) +++ head/sys/conf/kern.opts.mk Fri Nov 14 21:10:45 2014 (r274529) @@ -79,6 +79,18 @@ MK_${var}:= no .if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no" MK_${var}_SUPPORT:= no .else +.if defined(KERNBUILDDIR) # See if there's an opt_foo.h +OPT_${var}!= cat ${KERNBUILDDIR}/opt_${var:tl}.h; echo +.if ${OPT_${var}} == "" # nothing -> no +MK_${var}_SUPPORT:= no +.else MK_${var}_SUPPORT:= yes .endif +.else # otherwise, yes +MK_${var}_SUPPORT:= yes +.endif +.endif .endfor + + + Modified: head/sys/modules/if_gif/Makefile ============================================================================== --- head/sys/modules/if_gif/Makefile Fri Nov 14 21:08:51 2014 (r274528) +++ head/sys/modules/if_gif/Makefile Fri Nov 14 21:10:45 2014 (r274529) @@ -8,13 +8,6 @@ SYSDIR?=${.CURDIR}/../.. KMOD= if_gif SRCS= if_gif.c in_gif.c opt_inet.h opt_inet6.h -.if defined(KERNBUILDDIR) -OPT_INET6!= cat ${KERNBUILDDIR}/opt_inet6.h; echo -.if empty(OPT_INET6) -MK_INET6_SUPPORT=no -.endif -.endif - .if ${MK_INET6_SUPPORT} != "no" SRCS+= in6_gif.c .endif