[Top][All Lists]

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

Is error suppression possible for ignored errors?

From: Steve Connell
Subject: Is error suppression possible for ignored errors?
Date: Fri, 16 Apr 2004 14:59:50 -0700

Dear Sir or Madam:
The problem I am having is occuring on Red Hat Linux 9 using GNU Make 3.80.
I need to run the command "chmod" in my makefiles in order to ensure that pre existing generated files are writable before they are generated.  The main problem with this is that the Linux version of "chmod" returns 1 if the file does not exist (whereas on Solaris, "chmod" returns 0 if the file is not there and no error is reported) and causes make to fail.  I have worked around this problem by using a '-' character before the "chmod" command, but an error message is still printed out during the build.  Here is an example rule that is causing the problem:
%.obj : ../%.c
        -@ chmod -f +w $@
Adding the "-" before the @ allowed gmake to continue, however now I am getting an error message from gmake:
gmake[1]: [hostio.obj] Error 1 (ignored)
Is there a way to prevent this ignored error message from printing out?  All help is much appreciated.
Steven Connell
Texas Instruments, Inc.

reply via email to

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