help-make
[Top][All Lists]
Advanced

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

Re: $(wildcard ) evaluation


From: Philip Guenther
Subject: Re: $(wildcard ) evaluation
Date: Wed, 23 Jul 2008 14:14:44 -0600

On Wed, Jul 23, 2008 at 12:54 PM, Rinehart, Raleigh
<address@hidden> wrote:
...
>> My guess is that the *.out files are created as the side-effect of
>> some other rule.  Make doesn't know that, so it doesn't know to add
>> them to the cache, so $(wildcard *.out) gives the wrong result.
>>
>> Raleigh, does that sound like it could be case?  What creates the *.out
>> files?
>
> This is what I am thinking is the case, but not because the files are
> created "behind make's back".
...
> However, the way this is being invoked via a submake $(MAKE) leads me to
> believe from the observed behaviour that the changes to the cache are
> not getting propagated back up the stack.  Thus the top-level make
> (where the wildcard gets expanded) doesn't have them in it's cache.  I
> guess I'll have to do a $(shell ...) for things to work as they are.

Yep, that counts as 'behind the back' for the parent make.  Just
another reason Recursive Make Considered Harmful.  My recommendation
is to get rid of the use of recursive make, at least for that step.

Of course, there's the question of why you're using $(wildcard *.out)
instead of just *.out directly in the rules.  Why not let the shell do
the expansion?


Philip Guenther




reply via email to

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