%% Martin Sebor <[EMAIL PROTECTED]> writes:

  ms> Is there an efficient way to suppress the error output of the shell
  ms> in the $(shell) function?

  >> Make can't do it.  You can only do it from within the shell script
  >> you're invoking.

  ms> There's no way the script could do it if it doesn't exist :) Or
  ms> did you mean that I should wrap the command foo in a script that
  ms> is guaranteed to exist and invoke it instead? That would work but
  ms> it's just as inefficient as my $(shell /bin/sh) hack: it causes
  ms> two processes to be executed instead of just one.

Yes; I was basically saying that there's no better way than the way you
were doing it.

  ms> It seems that make should provide a mechanism to do it. After all,
  ms> it lets users decide what to do with the shell error output in all
  ms> other cases.

Such as when...?  Make never redirects shell output, error or otherwise,
that I can think of... $(shell ...) is the special case in that it traps
stdout and returns it as the result of the function evaluation.

-- 
-------------------------------------------------------------------------------
 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