diff options
| author | rillig <rillig@NetBSD.org> | 2023-06-21 14:33:36 +0000 |
|---|---|---|
| committer | rillig <rillig@NetBSD.org> | 2023-06-21 14:33:36 +0000 |
| commit | 76ebf67f83026cc338ca5a06296c302c718ae8b6 (patch) | |
| tree | a277c7b916ff314f9dfc66cdf41be7c2ee5117ad /usr.bin/make/parse.c | |
| parent | 67a7110d63a75ad1723d5795682ad1f0a9913418 (diff) | |
make: skip a file protected by a multiple-inclusion guard more often
In practice, the common situation is that a file is first included,
defines its multiple-inclusion guard and is then skipped instead of
being included again.
The other way round is that the multiple-inclusion guard is defined when
the file is included first. In that case, the file is now regarded as
guarded as well.
Diffstat (limited to 'usr.bin/make/parse.c')
| -rw-r--r-- | usr.bin/make/parse.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c index 2cd8bfb7405..9d18322e727 100644 --- a/usr.bin/make/parse.c +++ b/usr.bin/make/parse.c @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.702 2023/06/20 09:25:33 rillig Exp $ */ +/* $NetBSD: parse.c,v 1.703 2023/06/21 14:33:36 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -105,7 +105,7 @@ #include "pathnames.h" /* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: parse.c,v 1.702 2023/06/20 09:25:33 rillig Exp $"); +MAKE_RCSID("$NetBSD: parse.c,v 1.703 2023/06/21 14:33:36 rillig Exp $"); /* Detects a multiple-inclusion guard in a makefile. */ typedef enum { @@ -2681,7 +2681,7 @@ ReadHighLevelLine(void) condResult = Cond_EvalLine(line); if (curFile->guardState == GS_START) { Guard *guard; - if (condResult == CR_TRUE + if (condResult != CR_ERROR && (guard = Cond_ExtractGuard(line)) != NULL) { curFile->guardState = GS_COND; curFile->guard = guard; |
