%% "James" <[EMAIL PROTECTED]> writes:

  j> all: def
  j>         for f in q.d z.d; do echo $$f $(if $(call 
Diff,sub/$$f,sub2),diff,same); done

Remember: _all_ make expansion of variables, etc. is done _FIRST_, then
the result of the expansion is passed to the shell.  Then make just
waits for the shell to exit.

Here you have a mixture: you have make functions that are trying to use
the value of a shell loop variable $f, but that can't work because all
expansion of make functions is done well before the shell is even
invoked.


You have to rewrite your rule so that either it does the test in the
shell using shell's "if", or it does everything in make functions (using
make's looping with $(foreach ...)).

-- 
-------------------------------------------------------------------------------
 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-gnu-utils mailing list
help-gnu-utils@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-utils

Reply via email to