%% Nestor Amaya <[EMAIL PROTECTED]> writes:

  nl> find $(TMPDIR) -name '*~' | while read line; do rm "$line"; done

As Nestor points out, the "$l" in "$line" is expanded by make as the
variable "l", which is not defined and so expands to nothing.

Whenever shell scripting in make command scripts you _MUST_ remember to
escape all "$"'s you want passed to the shell.

  na> I had the same problem. Do the following:

  na> find $(TMPDIR) -name '*~' | while read line; do rm "$$line"; done

Note that this is not portable shell script syntax.  If you want to do
it portably you need:

  find $(TMPDIR) -name '*~' | (while read line; do rm "$$line"; done)

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.paulandlesley.org/gmake/
 "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

Reply via email to