On Mon, 2007-07-30 at 09:34 -0500, David A. Greene wrote: > > some_rule : some_file > > $(if $(DO_EXISTENCE_TEST_HERE),$(DO_GOODSTUFF),$(DO_BADSTUFF)) > > > All right, I believe I'm completely on the wrong path here because > $(if) and $(wildcard) aren't useful in rule actions since they get > expanded when the Makefile is parsed, not when the rule is invoked.
That's not true. The contents of a command script are evaluated when make is about to invoke the shell, and not before (otherwise variables like $@ etc. couldn't work, of course). See the GNU make manual for a complete description of when evaluation happens for different parts of the makefile. -- ------------------------------------------------------------------------------- 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
