From b13ac84d469b3618ced9dcece7d404b1d965c4ce Mon Sep 17 00:00:00 2001 From: Hartmut Brandt Date: Fri, 11 Mar 2005 11:29:39 +0000 Subject: [PATCH] Call ParseFinishLine() also for the last line in a file. This patch differs from the previous one in that it calls the function only when a real file hits EOF. The bodies of .for loops are also handled as files, but for these we don't want to end a dependency block on the 'EOF' as in: foo: do-this .for ... do-something .endfor do-more --- usr.bin/make/parse.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c index bb365317652..7068adabe8a 100644 --- a/usr.bin/make/parse.c +++ b/usr.bin/make/parse.c @@ -2534,6 +2534,9 @@ Parse_File(char *name, FILE *stream) free(line); } + if (curFile.F != NULL) + ParseFinishLine(); + /* * Reached EOF, but it may be just EOF of an include file... */