Re: make question (suppress Error)

"Paul D. Smith" <[email protected]>
Newsgroups gmane.comp.gnu.utils
Organization GNU's Not Unix!
Message-ID <[email protected]>
%% "James" <[email protected]> writes:

  j> How do I suppress Error message or is it possible?

  j> $ cat makefile
  j> all:
  j>         - ls *.zzz 2>/dev/null
  j> $ make
  j> ls *.zzz 2>/dev/null
  j> make: [all] Error 1 (ignored)

  j> I do not want the last line
  j> make: [all] Error 1 (ignored)
  j> to be shown.

Make will print that message if the script exits with a non-zero error
code.  So, if you don't want to see it, just make sure that doesn't
happen.  Something like:

 all:
         - ls *.zzz 2>/dev/null; exit 0

for example.

-- 
-------------------------------------------------------------------------------
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.