List Info

Thread: make question (suppress Error)




make question (suppress Error)
user name
2006-08-04 02:50:40
%% "James" <hslee911yahoo.com> 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 <psmithgnu.org>          Find
some GNU make tips at:
 http://www.gnu.org        
             http://make.paulandlesl
ey.org
 "Please remain calm...I may be mad, but I am a
professional." --Mad Scientist
_______________________________________________
help-gnu-utils mailing list
help-gnu-utilsgnu.org

http://lists.gnu.org/mailman/listinfo/help-gnu-utils
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )