On Wed, 2010-02-24 at 21:02 -0500, Aaron M. Ucko wrote: > Adam C Powell IV <hazelsct@debian.org> writes: > > > I've been beating my head on $(wildcard...) in a rules file for nearly a > > week now, and can't make any sense of it. The rules file is attached, > > In general, using $(wildcard ...) differs in two ways from using shell > wildcards directly (which I would recommend simply doing here): > > - make expands it before running *any* commands; that allows its use > in some contexts (particularly target lists), but backfires here > because there won't necessarily be a *-packages directory when make > starts. > > - When there are no matches, it expands to nothing, which is not > default shell behavior (but available with bash's shopt nullglob). > > Your observations are consistent with that; in particular, your echo > statement lists site-packages only because you fed the shell an > unquoted wildcard. After a couple of tries, I think I get it: the wildcard is expanded before any of the target is run, and at that point, there's no directory. Okay, in that case I'll just use the unquoted wildcard, and not the $(wildcard...). And it works! Thank you very much for the explanation, it's a funny beast and just RTFM didn't quite get me there. -Adam -- GPG fingerprint: D54D 1AEE B11C CE9B A02B C5DD 526F 01E8 564E E4B6 Engineering consulting with open source tools http://www.opennovation.com/
Attachment:
signature.asc
Description: This is a digitally signed message part