----- Original Message ----- From: "Paul D. Smith" <[EMAIL PROTECTED]>
To: "Angel Tsankov" <[EMAIL PROTECTED]> Cc: "make-help mailing list" <[email protected]> Sent: Friday, July 01, 2005 2:27 PM Subject: Re: Prerequisites processing order
%% "Angel Tsankov" <[EMAIL PROTECTED]> writes: at> Does make process prerequisites in a specified order? If so, what at> is it? Make always processes prerequisites in the order they appear in the prerequisites list, with one exception: the prerequisites in the rule containing the command script for that target are processed first, regardless of the order in which they appear. For example, this makefile: all: one two all: three four one two three four: ; @echo $@ will always print: one two three four But this one: all: one two all: three four; @echo "$@: $^" one two three four: ; @echo $@ will always print: three four one two all: three four one two This is guaranteed. HOWEVER! There is another twist here. If you run make with the -j option, to run jobs in parallel, then although make still walks the prerequisites list in this order it will invoke "sibling" prerequisites at the same time. This can mean (depending on the scheduler of your operating system, and/or the relative amount of time it takes to build various prerequisites, they can complete in a different order. If you want to use -j you MUST declare all dependency relationships and not rely on any ordering implicit in the makefile.
How do I define dependency relationships? _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
