Standardize NO_CCACHE flag and ccache definitions
Edwin Groothuis
edwin at mavetju.org
Wed Jun 18 13:26:41 UTC 2008
On Wed, Jun 18, 2008 at 03:11:43PM +0200, Alex Dupre wrote:
> Edwin Groothuis ha scritto:
> >Unfortunately /etc/make.conf is read before the ports Makefile is
> >read, so this in /etc/make.conf isn't going to work anymore:
> >
> > .if !defined(NO_CCACHE)
> > CC=/usr/local/libexec/ccache/cc
> > CXX=/usr/local/libexec/ccache/c++
> > CPP=/usr/local/libexec/ccache/cpp
> > CCACHE_DIR=/usr/local/ccache
> > .endif
>
> This is not the recommended way to use ccache. Look at the port's
> documentation.
True. It's also not the ones I use on the jails:
[/usr/ports/devel/cmake] root at build3>cat /etc/make.conf
[/usr/ports/devel/ccache] root at build3>cat /etc/make.conf
WRKDIRPREFIX= /var/ports
DISTDIR= /var/ports/distfiles
PACKAGES= /var/ports/packages
PACKAGE_BUILDING= yes
FTP_PASSIVE_MODE= yes
.if !defined(NOCCACHE)
CC=/usr/local/libexec/ccache/world-cc
CXX=/usr/local/libexec/ccache/world-c++
.endif
# added by use.perl 2008-06-18 13:13:07
PERL_VER=5.8.8
PERL_VERSION=5.8.8
[/usr/ports/devel/cmake] root at build3>export PATH=/usr/local/libexec/ccache:$PATH
[/usr/ports/devel/cmake] root at build3>export CCACHE_PATH=/usr/bin:/usr/local/bin
[/usr/ports/devel/cmake] root at build3>make clean build
===> Cleaning for cmake-2.6.0
===> Extracting for cmake-2.6.0
[...]
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/local/libexec/ccache/world-cc
-- Check for working C compiler: /usr/local/libexec/ccache/world-cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/local/libexec/ccache/world-c++
-- Check for working CXX compiler: /usr/local/libexec/ccache/world-c++ -- works
[...]
[ 4%] Building CXX object Source/kwsys/CMakeFiles/cmsys.dir/SystemInformation.o
Linking CXX static library libcmsys.a
Error running link command: No such file or directory
*** Error code 2
Edwin
--
Edwin Groothuis | Personal website: http://www.mavetju.org
edwin at mavetju.org | Weblog: http://www.mavetju.org/weblog/
More information about the freebsd-ports
mailing list