help-make
[Top][All Lists]
Advanced

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

Re: Link called only if all other actions are completed


From: Erik Rull
Subject: Re: Link called only if all other actions are completed
Date: Sat, 09 Oct 2010 00:45:03 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.13) Gecko/20100914 Lightning/1.0b1 SeaMonkey/2.0.8

grischka wrote:
So in your example:

target1.so: file1.o file2.o file3.o ...
$(LD) ...

target2.so: file4.o file5.o file6.o ...
$(LD) ...

Make will start 5 jobs immediately:

file1.o file2.o file3.o file4.o file5.o

Every time a job slot comes free, make will continue building .o's until
all three of the first .o's (file1.o, file2.o, file3.o) complete, then
it will run the link for target1.so with the next available job slot.

Does not happen. Because gmake doesn't check the availability of a
job slot before it starts walking the dependency tree to decide what
to build next. Tt will not go back and see whether after completion
of the last command it could now link something if it has already
decided to compile next file.o right before it noticed that it had
to wait.

So with the given example it will indeed call link only after all
other actions are already _started_ (not necessarily completed).

It is not incorrect behavior but is not entirely nice either, IMO.

--- grischka


Hi all,

thanks for your explanations!

Is it possible to give a debug-output of the job token a command got assigned?
I cannot read back the number of possible jobs but maybe the job token the command got...

Best regards,

Erik



reply via email to

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