From owner-freebsd-ports@FreeBSD.ORG Thu May 18 02:20:35 2006 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5A7EB16A5F6; Thu, 18 May 2006 02:20:35 +0000 (UTC) (envelope-from beech@alaskaparadise.com) Received: from pinnacle.akherb.com (60-105-237-24.gci.net [24.237.105.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id D7A3743D48; Thu, 18 May 2006 02:20:34 +0000 (GMT) (envelope-from beech@alaskaparadise.com) Received: by pinnacle.akherb.com (Postfix, from userid 1007) id 43DB15D77; Wed, 17 May 2006 18:20:34 -0800 (AKDT) X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on pinnacle.akherb.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=4.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.1 Received: from [192.168.241.103] (7-137-58-66.gci.net [66.58.137.7]) by pinnacle.akherb.com (Postfix) with ESMTP id 4A4E25C10; Wed, 17 May 2006 18:20:32 -0800 (AKDT) From: Beech Rintoul Organization: Alaska Paradise To: Alejandro Pulver Date: Wed, 17 May 2006 18:20:17 -0800 User-Agent: KMail/1.9.1 References: <200605171306.42686.beech@alaskaparadise.com> <20060517221530.7eedf223@phobos.mars.bsd> In-Reply-To: <20060517221530.7eedf223@phobos.mars.bsd> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart8494824.xZPe9T57Dh"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200605171820.30056.beech@alaskaparadise.com> Cc: freebsd-ports@freebsd.org Subject: Re: Help with makefile options X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2006 02:20:36 -0000 --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 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--