Makefile Issue

Chris Rees crees at freebsd.org
Sun Nov 20 15:27:50 UTC 2011


On 20 November 2011 13:47, Cy Schubert <Cy.Schubert at komquats.com> wrote:
> In message <20111120000304.343059f4.stas at FreeBSD.org>, Stanislav Sedov
> writes:
>> On Fri, 18 Nov 2011 07:42:56 -0800
>> Cy Schubert <Cy.Schubert at komquats.com> mentioned:
>>
>> > Hi everyone,
>> >
>> > Can anyone enlighten me as to why this following make fragment doesn't
>> > work? It falls through to .else.
>> >
>> > PKGNAMESUFFIX=  -devel
>> > .if defined(PKGNAMESUFFIX) && !empty(PKGNAMESUFFIX)
>> > MASTER_SITES=   http://www.fwbuilder.org/nightly_builds/fwbuilder-5.0/build
>> -
>> > ${BUILD}/
>> > PORTVERSION=    ${DISTVERSION}.b${BUILD}
>> > .else
>> > MASTER_SITES=   SF/${PORTNAME}/Current_Packages/${PORTVERSION}
>> > DISTVERSIONSUFFIX=      .${BUILD}
>> > .endif
>> >
>> > If I replace PKGNAMESUFFIX=  -devel and the .if defined... with
>> > PKGNAMESUFFIX=  "-devel"
>> > .if defined(PKGNAMESUFFIX) && ${PKGNAMESUFFIX} == "-devel"
>> > it works.
>> >
>>
>> Works here.
>>
>> Why do you think it doesn't work for you?
>
> Got it working a couple of days ago. Typo elsewhere in the makefile.

Great to hear.

I find that make -V can be your friend, but the thing that mostly
trips me up here is doing a conditional based on LOCALBASE or similar
before bsd.port.pre.mk.

Chris


More information about the freebsd-ports mailing list