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/main.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/main.c')
-rw-r--r-- | usr.bin/make/main.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c index 14638c258ce..44b7b697406 100644 --- a/usr.bin/make/main.c +++ b/usr.bin/make/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.99 2012/10/09 19:47:09 espie Exp $ */ +/* $OpenBSD: main.c,v 1.100 2012/10/18 17:54:43 espie Exp $ */ /* $NetBSD: main.c,v 1.34 1997/03/24 20:56:36 gwr Exp $ */ /* @@ -124,9 +124,10 @@ static void read_all_make_rules(bool, bool, Lst, struct dirs *); static void read_makefile_list(Lst, struct dirs *); static int ReadMakefile(void *, void *); -static void record_option(int c, const char *arg) +static void +record_option(int c, const char *arg) { - char opt[3]; + char opt[3]; opt[0] = '-'; opt[1] = c; @@ -724,6 +725,10 @@ main(int argc, char **argv) * First snag any flags out of the MAKEFLAGS environment variable. */ Main_ParseArgLine(getenv("MAKEFLAGS")); + + basedirectory = getenv("MAKEBASEDIRECTORY"); + if (basedirectory == NULL) + setenv("MAKEBASEDIRECTORY", d.current, 0); MainParseArgs(argc, argv); |