Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Oct 2012 18:09:23 +0100
From:      Chris Rees <crees@FreeBSD.org>
To:        Bryan Drewery <bdrewery@freebsd.org>
Cc:        svn-ports-head@freebsd.org, Baptiste Daroussin <bapt@freebsd.org>, Alexey Dokuchaev <danfe@freebsd.org>, svn-ports-all@freebsd.org, ports-committers@freebsd.org
Subject:   Re: svn commit: r305357 - head/net/ssvnc
Message-ID:  <CADLo83-uQp8h=qdzAnWz=Aya94vtu5aSvvHMhd_NChTaFhN4Vw@mail.gmail.com>
In-Reply-To: <507307F7.3030406@FreeBSD.org>
References:  <201210061123.q96BNHVx053948@svn.freebsd.org> <20121008040154.GB91369@FreeBSD.org> <20121008045905.GD91369@FreeBSD.org> <20121008071642.GA91360@ithaqua.etoilebsd.net> <CADLo839ndFXumShc1FwM2zrfuq9Htt%2Bvx5c%2Bia%2B=t=1i0Q%2ByoQ@mail.gmail.com> <507307F7.3030406@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 8 October 2012 18:05, Bryan Drewery <bdrewery@freebsd.org> wrote:
> On 10/8/2012 12:02 PM, Chris Rees wrote:
>> On 8 October 2012 08:16, Baptiste Daroussin <bapt@freebsd.org> wrote:
>>> On Mon, Oct 08, 2012 at 04:59:06AM +0000, Alexey Dokuchaev wrote:
>>>> On Mon, Oct 08, 2012 at 04:01:54AM +0000, Alexey Dokuchaev wrote:
>>>>> On Sat, Oct 06, 2012 at 11:23:17AM +0000, Baptiste Daroussin wrote:
>>>>>> New Revision: 305357
>>>>>> URL: http://svn.freebsd.org/changeset/ports/305357
>>>>>>
>>>>>> Log:
>>>>>>   fix sense of a test
>>>>>>
>>>>>> -.if ${PORT_OPTIONS:MULTRAFTP}
>>>>>> +.if empty(PORT_OPTIONS:MULTRAFTP)
>>>>>
>>>>> That looks weird, and commit message is pretty cryptic as well.  Could you
>>>>> explain what went wrong here so others would not fall in the same pitfall?
>>>>
>>>> Err, I read is as ! vs. empty() test.  Still, I've noticved some arguments
>>>> on the syntax, would be nice to know if ! ${PORT_OPTIONS:M...} has issues
>>>> other than purely stylish.
>>>>
>>>
>>> No it hasn't (as far as I know)
>>>
>>
>> This is all my fault-- I was the one who suggested the original use of
>> ${FOO:M}, and I deliberately chose to retain empty(FOO) as the reverse
>> because I was convinced that the insanity of make's conditionals would
>> screw us over in some way.
>>
>> I have at [1] pulled together some simple tests, and I think I've
>> caught all use cases here.
>>
>> It seems to work fine-- are there any people more wizardly than me
>> with make that can confirm that it's OK?  If so, I'll update the docs.
>>
>> Chris
>>
>> [1] http://www.bayofrum.net/~crees/scratch/Makefile-do-we-need-empty-after-all
>>
>
> Can you add:
>
> !${PORT_OPTIONS:MFOO} && !${PORT_OPTIONS:MBAR}
>
> I swear there is a case where !${} results in an Error.

[crees@pegasus]~% cat Makefile
ONE=    two three four

.if ${ONE:Mtwo}

.warning ONE has two in it
.endif

.if !${ONE:Mfive}
.warning ONE does not have five in it
.endif

.if !${ONE:Mfive} && ${ONE:Mblargh}
.warning stuff?
.endif

.if !${ONE:Mfive} && ${ONE:Mone}
.warning This is also fine
.endif

.if ${ONE:Mfive} || ${ONE:Msix}
.warning So is this
.endif

.if !${ONE:Mfive} && !${ONE:Msix}
.warning bdrewery is wrong
.endif

all:
        @:
[crees@pegasus]~% make
"Makefile", line 5: warning: ONE has two in it
"Makefile", line 9: warning: ONE does not have five in it
"Makefile", line 25: warning: bdrewery is wrong
[crees@pegasus]~%

:)

Chris



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLo83-uQp8h=qdzAnWz=Aya94vtu5aSvvHMhd_NChTaFhN4Vw>