Date: Tue, 26 Feb 2008 04:16:36 -0800 From: "Chris H." <chris#@1command.com> To: Jeremy Chadwick <koitsu@freebsd.org> Cc: freebsd-stable@freebsd.org Subject: Re: make KNOBS Message-ID: <20080226041636.75gokkbr5wg8ogos@webmail.1command.com> In-Reply-To: <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> <20080226115904.GA29222@eos.sc1.parodius.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Quoting Jeremy Chadwick <koitsu@freebsd.org>: > 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. :-) Indeed. In fact I read that the /preferred/ method was: true || false Which was why I mentioned it - which is /not/ to say you were wrong. I was just being "anal", and forgot the ;) on the end. After all: true == yes, no? ;) > >>> 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. I think we are /ultimately/ saying the same thing, but in /slightly/ different context. In any case; understood. :) Thanks again. --Chris H > > -- > | 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 | > > -- panic: kernel trap (ignored)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080226041636.75gokkbr5wg8ogos>