Without being too clever, here's an SSCCE:

define VAR
$(foreach item, foo bar,        $(shell echo $(item)>>foobar.txt))
endef

foobar:
        $(VAR)


You see that VAR is expanded during the "first pass" of make, and it's value is 
nothing, but, I am relying on it's side effects to echo things to a file.  So I 
care, that the invocations of echo, are in order, and wait for each other to 
finish.  

I guess what you are saying is, the (first pass of) make is serial.  And in the 
manual it says, that make waits for the end of the shell function to collect 
the output of the shell.  

So that would mean, the above example should behave as expected.  

The reason why I was asking, is I see in one of my users, a rather bizarre 
effects, which would be consistent with the above shell invocations executed 
"in parallel" and/or not "in order".  So I think I should look for another 
explanation?

Mark

_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to