help-make
[Top][All Lists]
Advanced

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

Ignore error


From: Leeuwesteijn,Joost
Subject: Ignore error
Date: Mon, 1 May 2006 17:38:51 +0200

Hi all,

My compiler returns a non-zero exit code in case of errors but -also- in
case of warnings, which causes by make to fail :-( In my other post I asked
about gcc's stdout/stderr output but I'd also like to know if gcc returns a
non-zero exit code in case of warnings-only. I don't like my build to fail
when there are only warnings.

I can't use $(IGNORE_ERROR) (i.e. - ) in front of my compiler command
because that would also cause it to continue in case of errors. Has anybody
ever ran into this? And found a proper solution?

Is it possible to specify a minimum exit code when make should fail? I
believe Mcrsft nmake has something like "-1 <command>" to specify that it
should only ignore exit codes <= 1 (i.e. continue on exit code 0 -and- 1).
My compiler exits with code 1 on warnings, code 2 on errors (and possibly
warnings). I'd like to skip the warning exit code only.

I seem to be stuck now. I can't use ignore error, but the build fails when
there's a single (possibly acceptable) warning.

There doesn't seem to be a way to check the exit code myself either, like
so:
   -$(CC) $(FILES)
   $(CHECK_EXIT_CODE_AND_CONTINUE_OR_EXIT)
because of separate shells.

Any suggestions?

Regard,
Joost Leeuwesteijn




reply via email to

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