From owner-freebsd-current@FreeBSD.ORG Fri Mar 17 16:56:33 2006 Return-Path: X-Original-To: current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7E73416A400 for ; Fri, 17 Mar 2006 16:56:33 +0000 (UTC) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id DFFFE43D45 for ; Fri, 17 Mar 2006 16:56:32 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from localhost (rocky.ip.net.ua [82.193.96.2]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id k2HGuVXs075617 for ; Fri, 17 Mar 2006 18:56:31 +0200 (EET) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua ([82.193.96.10]) by localhost (rocky.ip.net.ua [82.193.96.2]) (amavisd-new, port 10024) with LMTP id 39225-06 for ; Fri, 17 Mar 2006 18:56:31 +0200 (EET) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id k2HGuJ6b075613 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 17 Mar 2006 18:56:19 +0200 (EET) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.4/8.13.4) id k2HGudbk002584 for current@FreeBSD.org; Fri, 17 Mar 2006 18:56:39 +0200 (EET) (envelope-from ru) Date: Fri, 17 Mar 2006 18:56:38 +0200 From: Ruslan Ermilov To: current@FreeBSD.org Message-ID: <20060317165638.GA1172@ip.net.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sm4nu43k4a2Rpi4c" Content-Disposition: inline User-Agent: Mutt/1.5.11 X-Virus-Scanned: amavisd-new at ip.net.ua Cc: Subject: [HEADS UP] New world/kernel build options are imminent X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Mar 2006 16:56:33 -0000 --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, For some time now, there has been a need to redesign the model of build options for world/kernel. Warner Losh, Poul-Henning Kamp and I has been working towards the implementation, with some useful input from Kris Kennaway and John Baldwin. The new model borrows internal part of implementation from NetBSD and user API part from FreeBSD ports. There were several goals: - The new naming scheme should be uniform, easy to remember. - There should be a full list of options, with clear defaults and dependencies, in one central place. - API should be stable and detective of user/developer errors. - make(1) environment should be clean outside world/kernel. Basically, the new implementation looks like this: - There are MK_* options that are set either to "no" or "yes". Makefiles test them with either ``=3D=3D "no"'' or ``!=3D "no"''. Users have no direct control over these variables, and attempt to set them will result in an error from make(1). Most options default to "yes", but some default to "no". Options may have dependencies. - Then there are WITH_*/WITHOUT_* user configurable knobs (value is not important). WITH_FOO changes MK_FOO to "yes", WITHOUT_FOO changes MK_FOO to "no". Both WITH_FOO and WITHOUT_FOO can't be set at the same time, attempt to do so will result in an error. - Some options have child MK_*_SUPPORT options. - Full back compatibility is provided. The plan is to desupport old options in 7.0-RELEASE, but that's an open question. - Options can be passed on the make(1) command line or in the new /etc/src.conf (overrideable). The reason for the new src.conf is so we keep make(1) environment clean from these variables outside world/kernel builds (make.conf pollutes the environment as it's included by sys.mk). Now for some examples: Old way: NO_INET6 New way: WITH_INET6/WITHOUT_INET6 (user knobs) MK_INET6 (defaults to "yes", changed by above two knobs) WITH_INET6_SUPPORT/WITHOUT_INET6_SUPPORT (user knobs) MK_INET6_SUPPORT (defaults to "yes" unless ${MK_INET6} =3D=3D "no, in which case forced to "no". If not forced to "no", can be changed by above two knobs) NO_INET6 is provided for compatibility and sets WITHOUT_INET6 Old way: YES_HESIOD New way: WITH_HESIOD/WITHOUT_HESIOD (user knobs) MK_HESIOD=3D{no|yes} (defaults to "no", changed by above two knobs) Old way: .if !defined(NO_KERBEROS) && !defined(NO_CRYPT) && !defined(NO_OPENSSL) New way: .if ${MK_KERBEROS} !=3D "no" (dependencies are tracked) NO_CRYPT will set all of MK_CRYPT, MK_KERBEROS, MK_OPENSSL and MK_OPENSSH to "no". NO_PF will set both MK_PF and MK_AUTHPF to "no". This means less work and errors in makefiles. Implementation is at: http://people.freebsd.org/~ru/patches/mk.patch Implementation is in a single bsd.own.mk, should be easy to follow if you talk "make" language. Currently passed 75% of "make universe". To get a list of defaults: make -n -f bsd.own.mk -dg1 |grep ^MK_ To see how it works: $ make -n -f share/mk/bsd.own.mk -dg1 |grep ^MK_INET6 MK_INET6_SUPPORT =3D yes MK_INET6 =3D yes $ make -n -f share/mk/bsd.own.mk -dg1 -DWITHOUT_INET6 |grep ^MK_INET6 MK_INET6_SUPPORT =3D no MK_INET6 =3D no $ make -n -f share/mk/bsd.own.mk -dg1 -DWITHOUT_INET6_SUPPORT |grep ^MK_INE= T6=20 MK_INET6_SUPPORT =3D no MK_INET6 =3D yes $ make -n -f share/mk/bsd.own.mk -DWITH_INET6 -DWITHOUT_INET6 "share/mk/bsd.own.mk", line 348: WITH_INET6 and WITHOUT_INET6 shouldn't bot= h be set. $ make -n -f share/mk/bsd.own.mk -DNO_INET6=20 "share/mk/bsd.own.mk", line 261: warning: NO_INET6 is deprecated in favour = of WITHOUT_INET6=3D Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --sm4nu43k4a2Rpi4c Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFEGupGqRfpzJluFF4RAmxRAJ4pK2yRsT5tRFAP2R6mvdCVcqlfywCeNvNZ OVZCg6KWK4iqrXkDCdn4KgU= =stVT -----END PGP SIGNATURE----- --sm4nu43k4a2Rpi4c--