[Top][All Lists]

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

RE: trouble with $(wildcard)

From: Steve James
Subject: RE: trouble with $(wildcard)
Date: Mon, 8 Oct 2001 15:26:01 -0700

> This is because GNU make caches the contents of directories, for speed
> purposes.

That certainly would explain the behaviour.

> When you have a rule that builds something other than what it says it
> builds (here, the "setup" rule builds the directory "xxx", which make
> doesn't know about) then the cache is not updated correctly and things
> like $(wildcard ...) return the wrong values.
>  __dummy := $(shell [ -d xxx ] || mkdir -p xxx)

The example that I gave was contrived.  In reality the directory xxx is
created as a side-effect of running some command; later on, in another rule,
I want to pass this directory to some other command, but only if the
directory exists.  It looks like I'll have to use shell commands from within
the second target's rules to accomplish this (that's arguably more correct
anyway, now that I think about it).

Thanks for your help.

- Steve James

reply via email to

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