From: quixoticsycophant@... Date: 2006-11-02T01:20:20+09:00 Subject: Re: parallel tasks with rake ? Wilson Bilkovich wrote: > On 11/1/06, quixoticsycophant@yahoo.com wrote: > > I was excited to switch my makefile system to rake, but I just > > noticed rake lacks a (GNU) make option I can't live without: -j4. > > It's like "make & ; make & ; make & ; make &" but with the > > parallel jobs properly synchronized. On a quad-core machine this > > makes a world of difference, being around four times faster than a > > simple 'make'. > > > > As I understand it, rake should be able to determine which targets > > can be built in parallel just as (GNU) make does. rake's > > multitask feature isn't quite right because it shouldn't be up to > > the user to determine parallel vs non-parallel tasks. In fact, > > the user should probably never decide parallelism by fiat; even if > > the user happens to be correct, it creates a maintenance problem > > whereby additional tasks will eventually render the parallel > > assertion false. > > > > Perhaps there is something I'm missing about 'multitask' ? > > How does Make figure out which jobs can be run in parallel? In my > experience, it just runs everything in parallel, and things break when > the tasks aren't safely parallelizable. (e.g. doing make -j4 install > on a FreeBSD port) The Make program figures it out from the dependency graph. Unfortunately, the 'install' target you mention is a fake target which depends on nothing. Such uses of 'install' are common but incorrect. As a workaround, 'install' (and any other wrongly written targets) should be treated as a special case and should not be run with -j.