[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Parallel build
From: |
Paul Smith |
Subject: |
Re: Parallel build |
Date: |
Tue, 28 Feb 2012 11:30:56 -0500 |
On Tue, 2012-02-28 at 17:57 +0400, niXman wrote:
> Hello,
>
> I built make from CVS. I'am confused that option "-jN" didn't work properly.
> When I set N to count (doesn't matter how much I set) It will build
> using 1 thread.
> If I'm use this option without setting count It'll build with a lot of
> threads (more than 20).
> Why does make work not properly?
You'll have to provide a test case, and explain what happens, otherwise
we can't help.
This makefile, for example, works correctly for me on GNU/Linux (with
-j2 I get two jobs at a time running):
all: 1.p 2.p 3.p 4.p 5.p 6.p
.PHONY: all
%.p: ; @echo start $* && sleep 2 && echo end $*
Using this I can see that the first two run, then a pause, then the next
two, etc.:
start 1
start 2
end 1
end 2
start 3
start 4
end 3
end 4
start 5
start 6
end 5
end 6
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.mad-scientist.net
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist