help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: suppressing shell error output


From: Paul D. Smith
Subject: Re: suppressing shell error output
Date: Tue, 13 Sep 2005 18:12:16 -0400

%% Martin Sebor <address@hidden> 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 <address@hidden>          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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]