diff options
author | harti <harti@FreeBSD.org> | 2004-07-20 07:42:06 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2004-07-20 07:42:06 +0000 |
commit | ee1888d8962780e7914e938802e838cd4ad5ef1f (patch) | |
tree | 46c63222fe2a3c5eb5a6550c60789b5b6f507421 /usr.bin/make/parse.c | |
parent | da5b50a882531f96547526696b70bb1f967b00a0 (diff) | |
download | FreeBSD-src-ee1888d8962780e7914e938802e838cd4ad5ef1f.zip FreeBSD-src-ee1888d8962780e7914e938802e838cd4ad5ef1f.tar.gz |
Improve make's diagnostic of mistmatched .if-.endif. This patch is
slightly different from the patch in the PR. The problem is, that
make handles .if clauses inside false .if clauses simply by
counting them - it doesn't put them onto the conditional stack, nor even
parses them so we need an extra line number stack for these ifs.
PR: bin/61257
Submitted by: Mikhail Teterin <mi@aldan.algebra.com>
Diffstat (limited to 'usr.bin/make/parse.c')
-rw-r--r-- | usr.bin/make/parse.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c index 65fcf05..e8a9935 100644 --- a/usr.bin/make/parse.c +++ b/usr.bin/make/parse.c @@ -105,27 +105,13 @@ static Lst targets; /* targets we're working on */ static Lst targCmds; /* command lines for targets */ static Boolean inLine; /* true if currently in a dependency * line or its commands */ -typedef struct { - char *str; - char *ptr; -} PTR; - static int fatals = 0; static GNode *mainNode; /* The main target to create. This is the * first target on the first dependency * line in the first makefile */ -/* - * Definitions for handling #include specifications - */ -typedef struct IFile { - char *fname; /* name of previous file */ - int lineno; /* saved line number */ - FILE * F; /* the open stream */ - PTR * p; /* the char pointer */ -} IFile; - -static IFile curFile; + +IFile curFile; /* current makefile */ static Lst includes; /* stack of IFiles generated by * #includes */ |