Date: Tue, 26 May 2015 16:17:25 +0000 (UTC) From: "Simon J. Gerraty" <sjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r283571 - projects/bmake/share/mk Message-ID: <201505261617.t4QGHPo0035138@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sjg Date: Tue May 26 16:17:24 2015 New Revision: 283571 URL: https://svnweb.freebsd.org/changeset/base/283571 Log: Add support for __DEFAULT_DEPENDENT_OPTIONS Modified: projects/bmake/share/mk/bsd.mkopt.mk Modified: projects/bmake/share/mk/bsd.mkopt.mk ============================================================================== --- projects/bmake/share/mk/bsd.mkopt.mk Tue May 26 14:12:06 2015 (r283570) +++ projects/bmake/share/mk/bsd.mkopt.mk Tue May 26 16:17:24 2015 (r283571) @@ -18,6 +18,10 @@ # after all this processing, allowing this file to be included # multiple times with different lists. # +# Other parts of the build system will set BROKEN_OPTIONS to a list +# of options that are broken on this platform. This will not be unset +# before returning. Clients are expected to always += this variable. +# # Users should generally define WITH_FOO or WITHOUT_FOO, but the build # system should use MK_FOO={yes,no} when it needs to override the # user's desires or default behavior. @@ -33,7 +37,11 @@ MK_${var}:= no .else MK_${var}:= yes .endif +.else +.if ${MK_${var}} != "yes" && ${MK_${var}} != "no" +.error "Illegal value for MK_${var}: ${MK_${var}}" .endif +.endif # !defined(MK_${var}) .endfor .undef __DEFAULT_YES_OPTIONS @@ -47,6 +55,31 @@ MK_${var}:= yes .else MK_${var}:= no .endif +.else +.if ${MK_${var}} != "yes" && ${MK_${var}} != "no" +.error "Illegal value for MK_${var}: ${MK_${var}}" .endif +.endif # !defined(MK_${var}) .endfor .undef __DEFAULT_NO_OPTIONS + +# +# MK_* options which are always no, usually because they are +# unsupported/badly broken on this architecture. +# +.for var in ${BROKEN_OPTIONS} +MK_${var}:= no +.endfor + +.for vv in ${__DEFAULT_DEPENDENT_OPTIONS} +.if defined(WITH_${vv:H}) && defined(WITHOUT_${vv:H}) +MK_${vv:H}?= no +.elif defined(WITH_${vv:H}) +MK_${vv:H}?= yes +.elif defined(WITHOUT_${vv:H}) +MK_${vv:H}?= no +.else +MK_${vv:H}?= ${MK_${vv:T}} +.endif +.endfor +.undef __DEFAULT_DEPENDENT_OPTIONS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505261617.t4QGHPo0035138>