[Top][All Lists]

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

Re: $(wildcard) bug or feature?

From: Paul D. Smith
Subject: Re: $(wildcard) bug or feature?
Date: Mon, 21 Apr 2003 00:01:50 -0400

%% "Hans O. Lowe" <address@hidden> writes:

  hol> foo:
  hol>  touch 1.k 2.k

  hol> bar:     foo
  hol>  @echo $(wildcard *.k)

  hol> Shouldn't $(wildcard) expand only after the target `foo' has been
  hol> made?

GNU make keeps a directory cache internally.  The first time it visits a
directory (to find a file for example) it caches the contents of the
directory.  Thereafter it updates the cache itself with information in
knows about.  But it won't be udpated with information it doesn't know
about, and it can't know about 1.k or 2.k, because you didn't tell make
that your rule would build them.

 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

reply via email to

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