bug-make
[Top][All Lists]
Advanced

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

Re: $(wildcard) not expanding generated files


From: Johan Bezem
Subject: Re: $(wildcard) not expanding generated files
Date: Tue, 21 Jan 2003 18:50:42 +0100

"Paul D. Smith" wrote:
> 
> %% "Johan Bezem" <address@hidden> writes:
> 
>   jb> this seems to be by design, to overcome the fact that
> 
>   jb>   OBJECTS = *.o
> 
>   jb> doesn't expand the list, whereas
> 
>   jb>   OBJECTS = $(wildcard *.o)
> 
>   jb> does. $(wildcard is expanded upon the first pass over the
>   jb> makefile, ie. when no rules have been executed yet;
> 
> This is not true... or at least not in the above case.
> 
> The $(wildcard ...) function is expanded using exactly the same rules as
> make variables and the other functions: there are _no_ special cases.
> 
> In the above example, because the variable is recursive $(wildcard *) is
> _not_ expanded when that line is read.
<...>
> ... because GNU make actually caches the contents of
> directories as it reads them, for performance reasons.

Well, what do you know: Not a day passes without learning something new ;-)
Thanks, Paul!

Johan





reply via email to

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