Re: HEADS UP: Ports are not ready for CFLAGS=-O2 in 6.0

From: Artem Ignatiev <zazubrik_at_mail.ru>
Date: Sun, 10 Jul 2005 12:51:30 +0400
On 09.07.2005, at 1:56, Jeremie Le Hen wrote:

> Hi Thierry,
>
>
>> and it does not work if he ports tree is "physically" elsewhere  
>> (mine is
>> shared over NFS from /files2/ports -> .CURDIR does not begin
>> with /usr/ports).
>>
>> Perhaps a better way would be to use a variable set in bsd.ports.mk
>> (BUILDING_PORT="YES")
>>
>
> I thought a bit more about this.  This seems to be a better idea than
> having a PORT_CFLAGS variable, because when a user wants to compile a
> port with uncommon CFLAGS, he will do the following (for instance) :
> %%%
>     cd /usr/ports/misc/vera
>     make CFLAGS='-O3' install clean
> %%%
>
> If we add something like this in ports/Mk/bsd.port.mk :
> %%%
>     .if defined(PORT_CFLAGS)
>     CFLAGS=${PORT_CFLAGS}
>     .end
> %%%
>
> This will obviously break POLA because setting CFLAGS won't work as
> expected.

Why not :
.if defined(PORT_CFLAGS) && !defined(CFLAGS)
CFLAGS=${PORT_CFLAGS}
.endif

or even:
.if defined(PORT_CFLAGS)
CFLAGS=${PORT_CFLAGS} ${CFLAGS}
.endif
Received on Sun Jul 10 2005 - 06:51:46 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:38 UTC