On Tue, 2013-10-01 at 21:42 +1000, David wrote:
> Based on this I expect that this makefile would be entirely
> immediately expanded during phase 1, and that the 3 statements would
> be expanded in order. But the output seems to prove that evaluation of
> line 2 does not occur between lines 1 and 3.
> 
> Can anyone explain what is happening here?

My suspicion is that this is a result of make's directory caching.  The
wildcard function reads through the directory cache to get the results
of the wildcard match.

That means that if make has cached the contents of the directory then
you run a $(shell ...) function which modifies the directory "behind
make's back" (basically outside of a rule with that file as a target),
make will not notice the change.


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

Reply via email to