Date: Fri, 14 Nov 2014 21:10:46 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> 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 Message-ID: <201411142110.sAELAkHs056942@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411142110.sAELAkHs056942>