On Mon, 2007-07-30 at 01:00 -0500, David A. Greene wrote:

> Is there a way to test for existence of some_file from another rule?
> 
> For example:
> 
> some_rule : some_file
>       $(if $(DO_EXISTENCE_TEST_HERE),$(DO_GOODSTUFF),$(DO_BADSTUFF))
> 
> $(wildcard some_file) doesn't always seem to be reliable.

There is no other way to do it than wildcard.  As long as you're testing
for the existence of a TARGET file (that is declared a target in the
makefile and only updated through the auspices of a make rule with that
file as a target) then wildcard should always be accurate.  If it's not,
that's a bug.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>          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


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to