Date: Mon, 16 May 2011 18:26:44 +0100 From: Chris Rees <utisoft@gmail.com> To: Doug Barton <dougb@freebsd.org> Cc: Warren Block <wblock@wonkity.com>, FreeBSD Ports <freebsd-ports@freebsd.org> Subject: Re: proper use of bsd.port.options.mk Message-ID: <BANLkTimJ0yR4K1%2BrqZ4L9ZjxPoeOvBAt8w@mail.gmail.com> In-Reply-To: <4DD15D8F.9020203@FreeBSD.org> References: <4DD09B45.9070306@FreeBSD.org> <alpine.BSF.2.00.1105152216460.20421@wonkity.com> <BANLkTin08WiMbkzpKmq_zaz2cGp0esMJxg@mail.gmail.com> <4DD15D8F.9020203@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 16 May 2011 18:23, Doug Barton <dougb@freebsd.org> wrote: > On 5/16/2011 3:23 AM, Chris Rees wrote: >> >> On 16 May 2011 05:18, Warren Block<wblock@wonkity.com> =A0wrote: >>> >>> On Sun, 15 May 2011, Doug Barton wrote: >>> >>>> I'm confused (yeah, I know, nothing new about that). From >>>> ports/Mk/bsd.port.options.mk: >>>> >>>> # usage: >>>> # >>>> # =A0 =A0 =A0 .include "bsd.port.options.mk" >>>> #<deal with user options> >>>> # =A0 =A0 =A0 .include "bsd.port.pre.mk" >>>> #<other work, including adjusting dependencies> >>>> # =A0 =A0 =A0 .include "bsd.port.post.mk" >>>> >>>> >>>> However the ports I've looked at so far all do: >>>> >>>> OPTIONS=3D =A0 =A0 =A0 =A0blah >>>> >>>> .include<bsd.port.options.mk> >>>> >>>> blah >>>> >>>> .include<bsd.port.mk> >>>> EOF >>>> >>>> I assume that this method works, since it seems like so many ports use >>>> it. >>>> Should the notes in options.mk be updated? >>> >>> Yes, it should be updated. =A0See examples "5.8 Simple use of OPTIONS" = and >>> "5.9 Old style use of OPTIONS" in the Porter's Handbook: >>> >>> >>> http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makef= ile-options.html >> >> No, because stuff is done in pre.mk which is not done in OPTIONS; >> handling dependencies such as USE_BZIP2 or USE_JAVA for example. >> >> After options processing, pre.mk is only needed if you need to do the >> above, which is why it's missed out on most ports. >> >> The Handbook part refers to 'SIMPLE' use of OPTIONS, so perhaps should >> have a 'complex' use of options as well... > > Can you give an example of a port that needs this? I didn't find any > examples of ports doing it the "complex" way, but my search wasn't > exhaustive. > > > Doug > Top of my head, no. However... OPTIONS=3D WITH_JAVA "With Java" on .include <bsd.port.options.mk> .if !defined(WITHOUT_JAVA) USE_JAVA=3D1.5+ .endif .include <bsd.port.pre.mk> --- do something with JAVA_PORT ---- .include <bsd.port.post.mk> I know this is rather strange, but that's how I see it being used. Chris
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTimJ0yR4K1%2BrqZ4L9ZjxPoeOvBAt8w>