ports without configure do not receive CC

2006-08-10 Thread [LoN]Kamikaze
Ports that do not set CC in their configure target don't get informed about the 
value of CC because it is only appended to MAKE_ENV for the configure target. 
Therefore I have written this patch:

http://www.freebsd.org/cgi/query-pr.cgi?pr=101120

It appends CC and CXX to the MAKE_ENV for the build target if not configure 
target is present.

A port affected by the addressed problem is graphics/png. If anyone else thinks 
this problem should be addressed, please reply here.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: ports without configure do not receive CC

2006-08-10 Thread Stanislav Sedov
On Thu, 10 Aug 2006 17:53:54 +0200
"[LoN]Kamikaze" <[EMAIL PROTECTED]> mentioned:

> Ports that do not set CC in their configure target don't get informed about 
> the value of CC because it is only appended to MAKE_ENV for the configure 
> target.

I think it doesn't present a big problem for i don't know a single
port that sets up value of CC variable in it's Makefile. Thus, we
have only 3 scenarios:
1) CC is set up on make commandline (e.g. make CC=xxx). In that case
make program will export value of CC to enviropment and every
make program executed will receive it
2) CC is exported to sheel enviropment. This case is obvious.
3) CC was defined in make.conf. In that case if GNU make isn't used
in do-build stage make will re-read make.conf and, thus, honor CC's
value. I think we should not consider GNU make's case - it's used
much less often, than our original make program.

-- 
Stanislav Sedov MBSD labs, Inc. <[EMAIL PROTECTED]>
Россия, Москва http://mbsd.msk.ru


If the facts don't fit the theory, change the facts.  -- A. Einstein

PGP fingerprint:  F21E D6CC 5626 9609 6CE2  A385 2BF5 5993 EB26 9581


signature.asc
Description: PGP signature


Re: ports without configure do not receive CC

2006-08-10 Thread [LoN]Kamikaze
Stanislav Sedov wrote:
> On Thu, 10 Aug 2006 17:53:54 +0200
> "[LoN]Kamikaze" <[EMAIL PROTECTED]> mentioned:
> 
>> Ports that do not set CC in their configure target don't get informed about 
>> the value of CC because it is only appended to MAKE_ENV for the configure 
>> target.
> 
> I think it doesn't present a big problem for i don't know a single
> port that sets up value of CC variable in it's Makefile. Thus, we
> have only 3 scenarios:
> 1) CC is set up on make commandline (e.g. make CC=xxx). In that case
> make program will export value of CC to enviropment and every
> make program executed will receive it
> 2) CC is exported to sheel enviropment. This case is obvious.
> 3) CC was defined in make.conf. In that case if GNU make isn't used
> in do-build stage make will re-read make.conf and, thus, honor CC's
> value. I think we should not consider GNU make's case - it's used
> much less often, than our original make program.

Try that one in your make.conf:

.if ${CURDIR:M/usr/ports/*}
CC= distcc cc
CXX= distcc c++
.endif

WRKDIRPREFIX=/usr/obj


You'll see that in this case it is an issue. And that's exactly how my systems 
are set up.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: ports without configure do not receive CC

2006-08-10 Thread Stanislav Sedov
On Thu, 10 Aug 2006 19:55:08 +0200
"[LoN]Kamikaze" <[EMAIL PROTECTED]> mentioned:
> Try that one in your make.conf:
> 
> .if ${CURDIR:M/usr/ports/*}
> CC= distcc cc
> CXX= distcc c++
> .endif
> 
> WRKDIRPREFIX=/usr/obj
> 
> 
> You'll see that in this case it is an issue. And that's exactly how my 
> systems are set up.

% cd `mktemp -d /tmp/tmp.xxx`
% sudo sh -c 'echo "CC=distcc cc" >> /etc/make.conf'
% cat /etc/make.conf|grep CC
CC=distcc cc
% cat > Makefile
pre-everything::
make -V CC
.include 
^D
% make pre-everything
distcc cc

-- 
Stanislav Sedov MBSD labs, Inc. <[EMAIL PROTECTED]>
Россия, Москва http://mbsd.msk.ru


If the facts don't fit the theory, change the facts.  -- A. Einstein

PGP fingerprint:  F21E D6CC 5626 9609 6CE2  A385 2BF5 5993 EB26 9581


signature.asc
Description: PGP signature


Re: ports without configure do not receive CC

2006-08-10 Thread Stanislav Sedov
On Thu, 10 Aug 2006 19:55:08 +0200
"[LoN]Kamikaze" <[EMAIL PROTECTED]> mentioned:
> 
> Try that one in your make.conf:
> 
> .if ${CURDIR:M/usr/ports/*}
> CC= distcc cc
> CXX= distcc c++
> .endif
> 
> WRKDIRPREFIX=/usr/obj
> 

Your real problem is WRKDIRPREFIX. When do-build target is executed,
CURDIR isn't /usr/ports/.* but /usr/obj/usr/ports/.*.
Thus, your problem could be solved by replacing
${CURDIR:M/usr/ports/*} with ${CURDIR:Musr/ports/*}

No need to modify bsd.port.mk

-- 
Stanislav Sedov MBSD labs, Inc. <[EMAIL PROTECTED]>
Россия, Москва http://mbsd.msk.ru


If the facts don't fit the theory, change the facts.  -- A. Einstein

PGP fingerprint:  F21E D6CC 5626 9609 6CE2  A385 2BF5 5993 EB26 9581


signature.asc
Description: PGP signature


Re: ports without configure do not receive CC

2006-08-10 Thread [LoN]Kamikaze


Stanislav Sedov wrote:
> On Thu, 10 Aug 2006 19:55:08 +0200
> "[LoN]Kamikaze" <[EMAIL PROTECTED]> mentioned:
>> Try that one in your make.conf:
>>
>> .if ${CURDIR:M/usr/ports/*}
>> CC= distcc cc
>> CXX= distcc c++
>> .endif
>>
>> WRKDIRPREFIX=/usr/obj
>>
> 
> Your real problem is WRKDIRPREFIX. When do-build target is executed,
> CURDIR isn't /usr/ports/.* but /usr/obj/usr/ports/.*.
> Thus, your problem could be solved by replacing
> ${CURDIR:M/usr/ports/*} with ${CURDIR:Musr/ports/*}
> 
> No need to modify bsd.port.mk
> 

That leads to no end of problems if you have different settings for different 
ports,
because a port gets its specific settings and will later override them with the
settings that are set for all ports.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: ports without configure do not receive CC

2006-08-10 Thread Stanislav Sedov
On Thu, 10 Aug 2006 21:24:42 +0200
"[LoN]Kamikaze" <[EMAIL PROTECTED]> mentioned:
> That leads to no end of problems if you have different settings for different 
> ports,
> because a port gets its specific settings and will later override them with 
> the
> settings that are set for all ports.

You can use
.if ${CURDIR:M*usr/ports/CATEGORY/PORTNAME/*}
CC=XXX
.endif

like construction to support this.

-- 
Stanislav Sedov MBSD labs, Inc. <[EMAIL PROTECTED]>
Россия, Москва http://mbsd.msk.ru


If the facts don't fit the theory, change the facts.  -- A. Einstein

PGP fingerprint:  F21E D6CC 5626 9609 6CE2  A385 2BF5 5993 EB26 9581


signature.asc
Description: PGP signature


Re: ports without configure do not receive CC

2006-08-10 Thread Scot Hetzel

On 8/10/06, Stanislav Sedov <[EMAIL PROTECTED]> wrote:

On Thu, 10 Aug 2006 21:24:42 +0200
"[LoN]Kamikaze" <[EMAIL PROTECTED]> mentioned:
> That leads to no end of problems if you have different settings for different 
ports,
> because a port gets its specific settings and will later override them with 
the
> settings that are set for all ports.

You can use
.if ${CURDIR:M*usr/ports/CATEGORY/PORTNAME/*}
CC=XXX
.endif

like construction to support this.


Or use the sysutils/portconf port, and then place your port specific
variables in the /usr/local/etc/port.conf file, no need to clutter
/etc/make.conf.

CATEGORY/PORTNAME*: CC=XXX
editors/openoffice*: WITH_TTF_BYTECODE_ENABLED

Scot
--
DISCLAIMER:
No electrons were mamed while sending this message. Only slightly bruised.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: ports without configure do not receive CC

2006-08-10 Thread Scot Hetzel

On 8/10/06, Scot Hetzel <[EMAIL PROTECTED]> wrote:

Or use the sysutils/portconf port, and then place your port specific
variables in the /usr/local/etc/port.conf file, no need to clutter
/etc/make.conf.

CATEGORY/PORTNAME*: CC=XXX
editors/openoffice*: WITH_TTF_BYTECODE_ENABLED


Forgot to mention you can also have global variables defined in port.conf

*/*: WRKDIRPREFIX=/usr/obj

Scot

--
DISCLAIMER:
No electrons were mamed while sending this message. Only slightly bruised.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: ports without configure do not receive CC

2006-08-10 Thread [LoN]Kamikaze
Scot Hetzel wrote:
> On 8/10/06, Stanislav Sedov <[EMAIL PROTECTED]> wrote:
>> On Thu, 10 Aug 2006 21:24:42 +0200
>> "[LoN]Kamikaze" <[EMAIL PROTECTED]> mentioned:
>> > That leads to no end of problems if you have different settings for
>> different ports,
>> > because a port gets its specific settings and will later override
>> them with the
>> > settings that are set for all ports.
>>
>> You can use
>> .if ${CURDIR:M*usr/ports/CATEGORY/PORTNAME/*}
>> CC=XXX
>> .endif
>>
>> like construction to support this.
>>
> Or use the sysutils/portconf port, and then place your port specific
> variables in the /usr/local/etc/port.conf file, no need to clutter
> /etc/make.conf.
> 
> CATEGORY/PORTNAME*: CC=XXX
> editors/openoffice*: WITH_TTF_BYTECODE_ENABLED
> 
> Scot

Portconf wouldn't work on my system, because the location /usr/ports is hard 
coded,
and that's only a link on my system. I'm using buildflags, because that is a lot
more flexible.

Anyway, it's a fact that normally a port gets CC from the ports framework. And 
if
a port doesn't have a configure target it will not get it from there. That this
doesn't actually have an effect for 'most' people doesn't mean that it is not a 
problem.

I think CC and CXX should generally go into MAKE_ENV.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[EMAIL PROTECTED]"