diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-12-31 15:49:24 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-12-31 15:49:24 +0000 |
commit | 08d55a795ade813f9a909471f859e6ab4668f85a (patch) | |
tree | db95b42e22f3ad028e9a27707779e5056106af39 /usr.bin | |
parent | 92db87af8a449cc2c6b2dd7ad4ec93d73c1d96f9 (diff) |
if our node doesn't have a lineno/fname, inherit from `used' node.
This lets suffix rules finally print out where they come from...
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/make/engine.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.bin/make/engine.c b/usr.bin/make/engine.c index d1a6eca4ac6..94958db81b6 100644 --- a/usr.bin/make/engine.c +++ b/usr.bin/make/engine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: engine.c,v 1.16 2007/11/17 16:39:45 espie Exp $ */ +/* $OpenBSD: engine.c,v 1.17 2007/12/31 15:49:23 espie Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. * Copyright (c) 1988, 1989 by Adam de Boor @@ -238,6 +238,13 @@ Make_HandleUse(GNode *cgn, /* The .USE node */ if (cgn->type & OP_USE) pgn->unmade--; } + /* if the parent node doesn't have any location, then inherit the + * use stuff, since that gives us better error messages. + */ + if (!pgn->lineno) { + pgn->lineno = cgn->lineno; + pgn->fname = cgn->fname; + } } void |