Make (Parallel Jobs) on Windows

Viewed 14184

What setup works for GNU make parallel jobs (-j) on Windows?

I have tried setting the shell to cmd.exe using MinGW make 3.81, this works in creating the multiple processes but make fails with the "waiting for job" message.

Can this work and what is the best setup? (MinGW / Cygwin / ???) Can someone point me to a working example to test against?

5 Answers

I found this Danny Thorpe's blog entry that explains the problems with parallel make build on Windows. Basically what it suggests is to set the following environment variable first:

set SHELL=cmd.exe

With that, I was able to run the make -j style command, but unfortunately not the controlled make -jN style command.

I've never had any promblems using make -jn under Cygwin. It works rather well. I regularly use it with Microsoft's cl.exe compiler. It just works out of the box for me. Very UNIX like, which is a Good Thing™. Build scripts port nicely to Linux and the Mac. Thoroughly recommended.

Never liked MinGW make since I got to a place where 5 back-slashes were too few, yet six was too many. Sigh! (To do with MinGW hacks to make backslash separated path names allowable in make AFAIK.)

Related