diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2012-10-18 17:54:44 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2012-10-18 17:54:44 +0000 |
commit | 1211b87f8dddc631841df5d98575d01a2a8f5e48 (patch) | |
tree | 60db7a0a0ffc937ac4d2158a375f306c85ceed74 /usr.bin/make/lowparse.c | |
parent | dd969649aa19881cb80e242688c748bb8f4b0010 (diff) |
numerous error message fixes:
- do ^C checking differently: don't record sent signals, but when jobs
die, recheck whether we received/have pending a INT/QUIT/TERM/HUP signal.
Then don't display our process group "normally", instead group together
everything dying by signal/shell dying by signal (just give the target
names).
- make certain we always handle signals before dying from "other conditions"
- have the parser messages look more like normal messages
- remove double error messages from some parser errors
- make sure unclosed variables ARE errors when some modifiers are present
- keep track of the base directory we're run from, so that submakes can
get shortened directories...
- make sure the whole error message including silent command fits into a
reasonable length.
okay millert@
Diffstat (limited to 'usr.bin/make/lowparse.c')
-rw-r--r-- | usr.bin/make/lowparse.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/usr.bin/make/lowparse.c b/usr.bin/make/lowparse.c index 405fde58fe2..277e07a2623 100644 --- a/usr.bin/make/lowparse.c +++ b/usr.bin/make/lowparse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lowparse.c,v 1.30 2012/10/02 10:29:31 espie Exp $ */ +/* $OpenBSD: lowparse.c,v 1.31 2012/10/18 17:54:43 espie Exp $ */ /* low-level parsing functions. */ @@ -279,11 +279,9 @@ Parse_ReadNextConditionalLine(Buffer linebuf) if (c == '\n') current->origin.lineno++; } - if (c == EOF) { - Parse_Error(PARSE_FATAL, - "Unclosed conditional"); + if (c == EOF) + /* Unclosed conditional, reported by cond.c */ return NULL; - } } current->origin.lineno++; } @@ -489,10 +487,8 @@ Parse_FillLocation(Location *origin) void Parse_ReportErrors(void) { - if (fatal_errors) { - fprintf(stderr, - "Fatal errors encountered -- cannot continue\n"); + if (fatal_errors) exit(1); - } else + else assert(current == NULL); } |