Date: Wed, 17 May 2006 18:20:17 -0800 From: Beech Rintoul <beech@alaskaparadise.com> To: Alejandro Pulver <alepulver@freebsd.org> Cc: freebsd-ports@freebsd.org Subject: Re: Help with makefile options Message-ID: <200605171820.30056.beech@alaskaparadise.com> In-Reply-To: <20060517221530.7eedf223@phobos.mars.bsd> References: <200605171306.42686.beech@alaskaparadise.com> <20060517221530.7eedf223@phobos.mars.bsd>
next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart8494824.xZPe9T57Dh Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Wednesday 17 May 2006 17:15, Alejandro Pulver wrote: > On Wed, 17 May 2006 13:06:30 -0800 > > Beech Rintoul <beech@alaskaparadise.com> wrote: > > I submitted an update and the comitter didn't like the way options > > > > were defined. He said: > > > =A0On Wednesday 17 May 2006 03:56, you wrote: > > > =A0> Could you please check the way you use OPTIONS against the > > > respective > PH chapter ? (check "on" options against WITHOUT and > > > "off" against WITH) > (I don't think you actually break something > > > because the "bug" mentioned > there only affects make > > > depend /describe, but let's be consistent). > > > > "Due to a deficiency in the infrastructure, you can only test WITH_* > > variables for options, which are OFF by default, and WITHOUT_* > > variables for options, which defaults to ON" > > > > And an example: > > > > OPTIONS=3D =A0 =A0 =A0 =A0IPV6 "Use IPv6" off \ > > .if defined(WITH_IPV6) > > .if defined(WITHOUT_IPV6) > > second .if should be: ,if !defined(WITH_IPV6) > > > > =A0> grep IFSESSION Makefile > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 IFSESSION "Include mod_ifsession" on \ > > .if defined(WITH_IFSESSION) > > should be .if !defined(WITHOUT_IFSESSION) > > > > How would this work? It looks to me like they would be defined as > > opposite of what they are intended to do. Could someone explain this > > to me? I seem to be missing something. > > Hello. > > This works when building without BATCH, but it won't work for example in > pointyhat (when building the binary packages). > > When you select an option, the variable WITH_option is defined, and > when you deselect it, WITHOUT_option is defined. The problem is that > when you build with BATCH, *nothing* is defined. I also got confused > with this before. > > For example, consider the following scenario, where nothing is defined: > > 1) .if defined(WITH_IFSESSION) > > 2) .if !defined(WITHOUT_IFSESSION) > > In the first case the code won't be executed when BATCH is defined, > because there won't be WITH_/WITHOUT_ definitions. The only way to make > the code be executed is configuring the port (storing the options). > > But in the second case, if nothing is defined the code will be > executed. This way it the check will only fail if the user deselects > the option, and WITHOUT_IFSESSION is defined. > > Also, there is currently a patch in the queue (not applied yet) that > fixes this issue. > > I hope I have been clear. If you have doubts about something you can > ask me. > > Best Regards, > Ale Thanks, that helped a lot. I was having trouble getting my head around the= =20 need to define those options backwards. I wasn't thinking far enough ahead= =20 about pointyhat running in BATCH mode. Anyway, now it's clear why it's done= =20 that way :) Beech =2D-=20 =2D------------------------------------------------------------------------= =2D------------- Beech Rintoul - Sys. Administrator - beech@alaskaparadise.com /"\ ASCII Ribbon Campaign | Alaska Paradise \ / - NO HTML/RTF in e-mail | 201 East 9Th Avenue Ste.310 X - NO Word docs in e-mail | Anchorage, AK 99501 / \ - Please visit Alaska Paradise - http://www.alaskaparadise.com =2D------------------------------------------------------------------------= =2D------------- --nextPart8494824.xZPe9T57Dh Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQBEa9ntp5D0B1NlT4URAnsKAJ485YW2LOkoid8HBegvIRAnBtmhogCfZJdd aJLLlurCuZbXnXpwmc7Lb7o= =ogZx -----END PGP SIGNATURE----- --nextPart8494824.xZPe9T57Dh--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605171820.30056.beech>