From owner-freebsd-stable@FreeBSD.ORG Tue Feb 26 11:59:04 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0A6510656C2 for ; Tue, 26 Feb 2008 11:59:04 +0000 (UTC) (envelope-from jdc@parodius.com) Received: from mx01.sc1.parodius.com (mx01.sc1.parodius.com [72.20.106.3]) by mx1.freebsd.org (Postfix) with ESMTP id D0B1E13C4DD for ; Tue, 26 Feb 2008 11:59:04 +0000 (UTC) (envelope-from jdc@parodius.com) Received: by mx01.sc1.parodius.com (Postfix, from userid 1000) id 973E71CC033; Tue, 26 Feb 2008 03:59:04 -0800 (PST) Date: Tue, 26 Feb 2008 03:59:04 -0800 From: Jeremy Chadwick To: "Chris H." Message-ID: <20080226115904.GA29222@eos.sc1.parodius.com> References: <20080225215522.r3jb5v548o0scks8@webmail.1command.com> <20080226070516.GB32690@team.vega.ru> <20080225233523.acl5s1lo8wgsw4wg@webmail.1command.com> <20080226080349.GA20881@eos.sc1.parodius.com> <20080226030509.mn558t4afk8cgkgs@webmail.1command.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080226030509.mn558t4afk8cgkgs@webmail.1command.com> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-stable@freebsd.org Subject: Re: make KNOBS X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2008 11:59:05 -0000 On Tue, Feb 26, 2008 at 03:05:09AM -0800, Chris H. wrote: >> Additionally, the WITH/WITHOUT variables seen in the Makefile are not >> always what they seem. For ports that use OPTIONS, you cannot define >> these on the command-line (e.g. make WITHOUT_FRUIT=yes); > I believe that /should/ be: > WITHOUT_FRUIT=true - (true/false) > --------------^^^^ The value itself does not matter; it could be WITHOUT_FRUIT=false; it makes no difference. The code simply detects whether or not the variable is set at all. This is why you have WITH_xxx and WITHOUT_xxx, rather than something like FEATURE_xxx=(yes|no|true|false). The make.conf(5) manpage documents this fact. :-) >> Also, there are some variables which are generally "global" across most >> ports, such as WITHOUT_IPV6. You wouldn't want to list those off in >> every single port, because that'd be somewhat redundant. > > My approach (for the most part) seems to overcome this. An example > of my final choice(s) related to our earlier Apache2 discussion: > in make.conf > > .if ${.CURDIR:M*/www/apache20} > WITH_MPM=worker > WITH_KQUEUE_SUPPORT=true > WITH_AUTH_MODULES=true > WITH_DAV_MODULES=true > WITH_MISC_MODULES=true > WITH_PROXY_MODULES=true > WITH_THREADS_MODULES=true > .endif > > This allows for a "per port" WITH_/WITHOUT_, somewhat eliminating the > "redundancy/ies", and let's me circumvent the "global" limitations. I don't think I did a good job explaining what I was talking about. I'm talking about variables like WITHOUT_IPV6, WITHOUT_X11, and some others. There is a "common standard" for those variable names, meaning they are used consistently throughout the ports tree, because the authors of said ports wondered at one point "Do other people use a variable elsewhere which already does this? What's its name, so I can keep it consistent." On our systems, we use stuff like this: # For ports WITHOUT_X11=yes WITH_APACHE2=yes WITHOUT_IPV6=yes .if ${.CURDIR:M*/databases/phpmyadmin} WITH_SUPHP=yes WITHOUT_PDF=yes WITHOUT_MCRYPT=yes WITHOUT_BZ2=yes WITHOUT_OPENSSL=yes .endif If the phpmyadmin port made use of WITHOUT_IPV6, it would *not* include IPv6 stuff. That's what I mean by "global" -- it applies to all ports. Note that the phpmyadmin entry in our make.conf has no *functional* purpose, because phpmyadmin uses the OPTIONS framework. It's used solely as a "reminder" whenever I do "make rmconfig" and need to re-pick what options to use. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |