GwenNelson / distcc

Automatically exported from code.google.com/p/distcc
GNU General Public License v2.0
0 stars 0 forks source link

[idea] 'make' wrapper with cores detection #84

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi

I think, it would be a usefull thing to add wrapper for make, which would 
gather information about accessible servers and then would run make -jX (where 
X would be +- number of found cores)

Was is ever discussed?

best regards

Original issue reported on code.google.com by Kice...@gmail.com on 31 Jul 2011 at 8:01

GoogleCodeExporter commented 9 years ago
If you call distcc you get the help that includes these lines:
..
Options:
..
   -j                         calculate the concurrency level from
                              the host list.

So what you need to do when you invoke your make command is:

set nr_distcc_procs=`distcc -j` #in tcsh shell, different for bash or other 
shells
make -j${nr_distcc_procs}

or something similar.
It should do exactly what you need.

HTH

Original comment by nilswoet...@gmail.com on 17 Sep 2011 at 2:14

GoogleCodeExporter commented 9 years ago
As nilswoetzel explained, the existing "-j" option to "distcc" should do what 
you want.

Original comment by fergus.h...@gmail.com on 4 Apr 2012 at 7:16