From owner-freebsd-ports@FreeBSD.ORG Mon May 16 17:23:44 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 9832F1065700 for ; Mon, 16 May 2011 17:23:44 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id B809914DEA7; Mon, 16 May 2011 17:23:28 +0000 (UTC) Message-ID: <4DD15D8F.9020203@FreeBSD.org> Date: Mon, 16 May 2011 10:23:27 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: utisoft@gmail.com References: <4DD09B45.9070306@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Warren Block , FreeBSD Ports Subject: Re: proper use of bsd.port.options.mk 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: Mon, 16 May 2011 17:23:44 -0000 On 5/16/2011 3:23 AM, Chris Rees wrote: > On 16 May 2011 05:18, Warren Block 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" >>> # >>> # .include "bsd.port.pre.mk" >>> # >>> # .include "bsd.port.post.mk" >>> >>> >>> However the ports I've looked at so far all do: >>> >>> OPTIONS= blah >>> >>> .include >>> >>> blah >>> >>> .include >>> 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. > > 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 -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/