Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 May 2011 12:47:18 -0600 (MDT)
From:      Warren Block <wblock@wonkity.com>
To:        Chris Rees <utisoft@gmail.com>
Cc:        Doug Barton <dougb@freebsd.org>, FreeBSD Ports <freebsd-ports@freebsd.org>
Subject:   Re: proper use of bsd.port.options.mk
Message-ID:  <alpine.BSF.2.00.1105160754150.22315@wonkity.com>
In-Reply-To: <BANLkTin08WiMbkzpKmq_zaz2cGp0esMJxg@mail.gmail.com>
References:  <4DD09B45.9070306@FreeBSD.org> <alpine.BSF.2.00.1105152216460.20421@wonkity.com> <BANLkTin08WiMbkzpKmq_zaz2cGp0esMJxg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

---902635197-120177441-1305555457=:22315
Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8BIT
Content-ID: <alpine.BSF.2.00.1105161241111.23548@wonkity.com>

On Mon, 16 May 2011, Chris Rees wrote:

> On 16 May 2011 05:18, Warren Block <wblock@wonkity.com> wrote:
>> 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:
>>> #
>>> #       .include "bsd.port.options.mk"
>>> #       <deal with user options>
>>> #       .include "bsd.port.pre.mk"
>>> #       <other work, including adjusting dependencies>
>>> #       .include "bsd.port.post.mk"
>>>
>>>
>>> However the ports I've looked at so far all do:
>>>
>>> OPTIONS=        blah
>>>
>>> .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.  See 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/makefile-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.

The comments ought to be updated to at least show both forms.

> 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.

Could you give an example?  I looked, but nothing obvious jumped out.

> The Handbook part refers to 'SIMPLE' use of OPTIONS, so perhaps should
> have a 'complex' use of options as well...

"Advanced" is the less-scary euphemism.
---902635197-120177441-1305555457=:22315--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1105160754150.22315>