[Rake-devel] Announcement: Alternate -j implementation

Steven Parkes smparkes at smparkes.net
Fri Apr 20 02:25:38 UTC 2012

On Apr 19, 2012, at 2:40 PM, Hongli Lai wrote:

> On Thu, Apr 19, 2012 at 7:03 PM, Mark Watson <watsonmw at gmail.com> wrote:
>>> To be honest, I prefer the drake semantics as they are closer to make's.
>> Second that. The option to specify parallel builds for any task is
>> handy because the task may not derive from multitask, e.g. it could be
>> a file task to build a c library from multiple source files that you
>> want to build in parallel.
>> Personally I've used my own patch to rake to do this, that was before
>> drake, but I still use it due to drake having an extra dependency.
>> https://github.com/watsonmw/rakecpp/blob/master/minusj/minusj.rb
> I agree. I would really love to see a 'make -j' equivalent in Rake.

I went through this just this week, after getting tired of some C++ builds using only 1 core. I first looked at multitask but got stopped by the file dependence issue. Then I did some wider searching and stumbled across drake. Been happy ever since.

I used make a lot in the past and always made the effort to make all the dependencies explicit (rather than implicit through dependence list order) so that make -j would work. But a lot of Makefiles don't do this and break with make -j just as many rakefiles would.

I can see this being a bigger issue with rake since its expressiveness makes it a lot easier to write things that have side-effects and won't parallelize. (Just like I see people write rakefiles that don't converge: that rebuild artifacts because they haven't described the dependencies correctly.)

But in any case, for my part, with (d)rake -j, I don't go back to make anymore at all, which makes my world a little nicer.

More information about the Rake-devel mailing list