make KNOBS
Jeremy Chadwick
koitsu at freebsd.org
Tue Feb 26 11:59:05 UTC 2008
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 |
More information about the freebsd-stable
mailing list