graphics/png - CC

[LoN]Kamikaze LoN_Kamikaze at gmx.de
Sun Jul 30 11:55:30 UTC 2006


I have finally found the reason for all this. In my make.conf I have set

WRKDIRPREFIX=/usr/obj

because /usr/ports is a read only nfs mount. Also it makes cleaning everything up a lot faster (than running 'make clean' in /usr/ports).

Now I have in my make.conf something like this:

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

It's actually more complex, but that's what it comes down to.

If I now do that:

# cd /usr/ports/graphics/png; make -V CC
distcc cc

I can see that the ports makefile has the right CC setting. However, the file /usr/obj/usr/ports/graphics/png/work/libpng-1.2.12/scripts/makefile.freebsd will read make.conf again and this time CC will not be set. Thus make will fall back to the default.

As I said before this is because CC is only forwarded to the configure script by bsd.port.mk . The do-build target doesn't forward CC to the makefile. However it forwards command line parameters, so that the problem doesn't appear when running 'make CC="distcc cc"'.

Weather that should be fixed in the port or in bsd.port.mk, should, I think be said by portmgr (CC). Probably several ports are affected, thus I'd prefer a solution in bsd.port.mk.


More information about the freebsd-ports mailing list