From owner-freebsd-ports@FreeBSD.ORG Mon May 16 10:23:38 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E453F1065672; Mon, 16 May 2011 10:23:38 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 35AC18FC0C; Mon, 16 May 2011 10:23:37 +0000 (UTC) Received: by bwz12 with SMTP id 12so5285400bwz.13 for ; Mon, 16 May 2011 03:23:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=HuQQBvDwcYwlXXFpTsxKDTSj3Cly2yyzXoCJpbWJifM=; b=xK2dO0WySgHaM1Sq/IOTtnO/fLV4smS0nRZg91fL6crDftwXZTv/06x3iCMMWiLTMH 1kEBjebipIKdI+QQHcvpFrgOnJ86BnqWASgHbl18/IfgUCKc0sE04mFE43QrqAg81TNi neffrBHQw7amjPbNPswOZ3UTqgX6NmopLTiH4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; b=Up1ipyJS5sUUgbHjdb9kzAksCLzOHWTgaX64vuF2LYMXH7JwDJFyvWG0Z/xHu3COGE XQ/pVb1SlR2Ke/AxPsIEBiOXa21iag3ky4s+70oGlWK4TH2joVhLCpBz+sWO7q+4tM5N efGyTZ1rblOvVvgh62VOK38sf6wO6tcYqCJhQ= Received: by 10.204.141.12 with SMTP id k12mr2508758bku.44.1305541417058; Mon, 16 May 2011 03:23:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.205.65.198 with HTTP; Mon, 16 May 2011 03:23:07 -0700 (PDT) In-Reply-To: References: <4DD09B45.9070306@FreeBSD.org> From: Chris Rees Date: Mon, 16 May 2011 11:23:07 +0100 Message-ID: To: Warren Block Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Doug Barton , 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 Reply-To: utisoft@gmail.com List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 May 2011 10:23:39 -0000 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: >> # >> # =A0 =A0 =A0 .include "bsd.port.options.mk" >> # =A0 =A0 =A0 >> # =A0 =A0 =A0 .include "bsd.port.pre.mk" >> # =A0 =A0 =A0 >> # =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 >> >> blah >> >> .include >> EOF >> >> I assume that this method works, since it seems like so many ports use i= t. >> Should the notes in options.mk be updated? > > Yes, it should be updated. =A0See examples "5.8 Simple use of OPTIONS" an= d > "5.9 Old style use of OPTIONS" in the Porter's Handbook: > > http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefil= e-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... Chris