%% Dan DeJohn <[EMAIL PROTECTED]> writes:
dd> In the list of commands for a rule, I want to execute a particular
dd> command (mv a file) only if one of the previous commands created
dd> the file.
All lines of a command script are evaluated at once, right before the
first line is executed.
So, the $(if ...) and $(wildcard ...) functions are being evaluated
before the touch command is run.
dd> don't know how to get the proper conditional execution of my mv
dd> command.
You'll have to use shell constructs, not make constructs, to do what you
want:
all:
touch xxx.abc
@if [ -f xxx.abc ]; then echo YES; else echo NO; fi
or something like that.
--
-------------------------------------------------------------------------------
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://mail.gnu.org/mailman/listinfo/help-make