[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Race condition with parallel recursive make
From: |
Christian Rishøj Jensen |
Subject: |
Race condition with parallel recursive make |
Date: |
Wed, 9 Mar 2011 11:54:42 +0100 |
I have a project with several sub-directories, each having some targets which
share a common dependency. The sub-directories are handled by spawning
sub-makes (using the special $(MAKE) variable).
Now, when running make with e.g. -j4 I see that several of the sub-makes are
attempting to build the common dependency at the same time. This is obviously
not desirable.
I was under the impression that the jobserver would prevent such situations, by
keeping track of what each sub-make is doing. I might be mistaken. Can someone
cast some light on this?
Is there a method for avoiding this sort of race condition?
Thanks.
/ Christian
- Race condition with parallel recursive make,
Christian Rishøj Jensen <=