diff options
| author | rillig <rillig@NetBSD.org> | 2020-09-07 06:58:02 +0000 |
|---|---|---|
| committer | rillig <rillig@NetBSD.org> | 2020-09-07 06:58:02 +0000 |
| commit | 9fbd2edecfe3df1633e7bcac9eed8cefad9de7b0 (patch) | |
| tree | 1d392c2d34fa5e35780b8a627d4dd1431061eef4 /usr.bin/make/parse.c | |
| parent | abdeff32c75f5c2859b29ef2fc74a5d8f9f9a5e0 (diff) | |
make(1): migrate Var_Parse to Var_ParsePP in ParseDoDependency
Diffstat (limited to 'usr.bin/make/parse.c')
| -rw-r--r-- | usr.bin/make/parse.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c index 12a8e098b34..da03404ad26 100644 --- a/usr.bin/make/parse.c +++ b/usr.bin/make/parse.c @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.286 2020/09/06 19:34:36 rillig Exp $ */ +/* $NetBSD: parse.c,v 1.287 2020/09/07 06:58:02 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: parse.c,v 1.286 2020/09/06 19:34:36 rillig Exp $"; +static char rcsid[] = "$NetBSD: parse.c,v 1.287 2020/09/07 06:58:02 rillig Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: parse.c,v 1.286 2020/09/06 19:34:36 rillig Exp $"); +__RCSID("$NetBSD: parse.c,v 1.287 2020/09/07 06:58:02 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -1190,8 +1190,7 @@ ParseDoDependency(char *line) /* Find the end of the next word. */ for (cp = line; *cp && (ParseIsEscaped(lstart, cp) || !(isspace((unsigned char)*cp) || - *cp == '!' || *cp == ':' || *cp == LPAREN)); - cp++) { + *cp == '!' || *cp == ':' || *cp == LPAREN));) { if (*cp == '$') { /* * Must be a dynamic source (would have been expanded @@ -1200,14 +1199,15 @@ ParseDoDependency(char *line) * no errors in this, as they would have been discovered * in the initial Var_Subst and we wouldn't be here. */ - int length; + const char *nested_p = cp; void *freeIt; - (void)Var_Parse(cp, VAR_CMD, VARE_UNDEFERR|VARE_WANTRES, - &length, &freeIt); + (void)Var_ParsePP(&nested_p, VAR_CMD, + VARE_UNDEFERR|VARE_WANTRES, &freeIt); free(freeIt); - cp += length - 1; - } + cp += nested_p - cp; + } else + cp++; } /* |
