distinguish between failure exit due to dmake failure vs signal aborted

This commit is contained in:
Caolán McNamara 2011-01-19 20:32:02 +00:00
parent b0ae2ae486
commit 8f9ab92e25
2 changed files with 6 additions and 3 deletions

View file

@ -28,7 +28,8 @@
#define MAX_INC_DEPTH 10 /* max of ten nested include files */
#define MAX_COND_DEPTH 20 /* max nesting level of conditionals */
#define ERROR_EXIT_VALUE 255 /* return code of aborted make */
#define ERROR_ABORT_VALUE 254 /* return code of aborted make */
#define ERROR_EXIT_VALUE 255 /* return code of failed make */
#define CONTINUATION_CHAR '\\' /* line continuation \<nl> */
#define DEF_ESCAPE_CHAR '\\' /* escape char for used chars */
#define ESCAPE_CHAR *Escape_char

View file

@ -37,6 +37,8 @@ Quit( sig )/*
======== Error or quit */
int sig;
{
int ret = ERROR_ABORT_VALUE;
if( sig == SIGINT )
fprintf(stderr, "Caught SIGINT. Trying to quit ...\n");
else
@ -48,7 +50,7 @@ int sig;
#endif
if( sig == 0 )
/* Don't be verbose during regular program termination. */
;
ret = ERROR_EXIT_VALUE;
else
fprintf(stderr, "Caught signal %d. Trying to quit ...\n", sig);
@ -78,7 +80,7 @@ int sig;
if( _quitting == 0 ) _handle_quit( ".ERROR" );
Set_dir( Makedir ); /* No Error message if we can't do it */
Epilog( ERROR_EXIT_VALUE );
Epilog( ret );
}