Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make make: document ParseDependencyOp
details: https://anonhg.NetBSD.org/src/rev/341b549a5b4a
branches: trunk
changeset: 984085:341b549a5b4a
user: rillig <rillig%NetBSD.org@localhost>
date: Mon Jun 21 10:42:06 2021 +0000
description:
make: document ParseDependencyOp
diffstat:
usr.bin/make/parse.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diffs (50 lines):
diff -r 0fd03ea70585 -r 341b549a5b4a usr.bin/make/parse.c
--- a/usr.bin/make/parse.c Mon Jun 21 10:33:11 2021 +0000
+++ b/usr.bin/make/parse.c Mon Jun 21 10:42:06 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.559 2021/06/21 10:33:11 rillig Exp $ */
+/* $NetBSD: parse.c,v 1.560 2021/06/21 10:42:06 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -109,7 +109,7 @@
#include "pathnames.h"
/* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.559 2021/06/21 10:33:11 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.560 2021/06/21 10:42:06 rillig Exp $");
/* types and constants */
@@ -1265,8 +1265,12 @@
}
}
+/*
+ * In a dependency line like 'targets: sources' or 'targets! sources', parse
+ * the operator ':', '::' or '!' from between the targets and the sources.
+ */
static bool
-ParseDependencyParseOp(char **pp, const char *lstart, GNodeType *out_op)
+ParseDependencyOp(char **pp, const char *lstart, GNodeType *out_op)
{
const char *cp = *pp;
@@ -1694,7 +1698,7 @@
/*
* First, grind through the targets.
*/
- /* XXX: don't use line as an iterator variable */
+ /* XXX: don't use 'line' as an iterator variable */
if (!ParseDependencyTargets(&cp, &line, lstart, &specType, &tOp,
&paths, &curTargs))
goto out;
@@ -1712,7 +1716,7 @@
/*
* Have now parsed all the target names. Must parse the operator next.
*/
- if (!ParseDependencyParseOp(&cp, lstart, &op))
+ if (!ParseDependencyOp(&cp, lstart, &op))
goto out;
/*
Home |
Main Index |
Thread Index |
Old Index