間違いだらけの備忘録

このページの内容は無保証でありこのページの内容によって直接、または間接に損害を受けられたとしても私は責任を取りません。

ccontrol

CCONTROL: Control your compiles
===============================

Distcc is great, so is ccache. But they are a PITA to control, as you
need to change environment variables and/or set CC, add -j to make
lines, etc. Explicit control of which compiler you want to use is
hard.

Enter ccontrol: it takes over invocations of make(1), gcc(1), cc(1),
g++(1), c++(1) and ld(1), and decides intelligently what to do, based
on a config file in the .ccontrol subdirectory of your home directory.
In particular, it allows different options depending on which
directory it is run in: you can suppress parallel builds for projects
(or particular make targets) which don't have correctly-working
Makefiles, use a different compiler, or not use ccache or distcc,
depending on where you are.

TROUBLESHOOTING

                            • -

Use distccmon-gnome (or "watch distccmon-text") to check if distcc is
working as expected. Use "watch ccache -s" to check if ccache is
working as expected.

If top reveals lots of "cc1", or your load is over 10, make sure your
Makefiles are invoking "gcc" or "cc" (ie. ccontrol), not the compiler
directly.

If your configuration file isn't working, try putting "verbose" in the
section you think should apply, or if all else fails, in the "[*]"
section.

ccontrol for Debian

                                    • -

By default the ccontrol[-init] programs will placed in /usr/bin and
the links (gcc, cc, ld etc.) will be placed in /usr/lib/ccontrol.
Hence users need to add /usr/lib/ccontrol to their path to work with
ccontrol.

export PATH=/usr/lib/ccontrol:$PATH

めも

http://nackedape.blogspot.com/2007/04/ccontorol.html

/usrbin/gccのリンクを変える
#/usr/bin
#ln -sf ccontrol gcc

あとは適宜?

$MAKEFLAGS=-j12 dpkg-buildpackage ....
とかすると動く

未検証

このページにはhatena以外のサービスからのコンテンツが埋め込まれています。 hatenaによりGoogle AdSense 広告が埋め込まれています。