help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Precedence in target rules executed in parallel


From: Riccardo Manfrin
Subject: Precedence in target rules executed in parallel
Date: Wed, 16 Oct 2013 10:54:50 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0

How to force precedence in target rules when invoking make with -jn with n>1 (on a multi core/threads machine)?

Let me clarify:

I have the following tagets/prerequisites rules:

all: $(MYLIB) TEST


$(MYLIB):
    ....

TEST:
    ...


With -j1 I get the library archived before the test. With -j8 I always get test done before the library (and therefore an error).

I could solve by putting $(MYLIB) as a prerequisite of TEST, but I don't want to pass through (=depend on) TEST for compiling the library. I would like to be able to exclude TEST on demand and stll compile the library

Thanks
RM




reply via email to

[Prev in Thread] Current Thread [Next in Thread]