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(1): rename GNode.iParents to implicitParents
details: https://anonhg.NetBSD.org/src/rev/b2b57759a325
branches: trunk
changeset: 938007:b2b57759a325
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Aug 30 14:11:42 2020 +0000
description:
make(1): rename GNode.iParents to implicitParents
The i alone was too ambiguous. It could have meant ignore, implicit,
interactive, and probably many more.
diffstat:
usr.bin/make/compat.c | 10 +++++-----
usr.bin/make/dir.c | 8 ++++----
usr.bin/make/make.c | 14 +++++++-------
usr.bin/make/make.h | 9 +++++----
usr.bin/make/suff.c | 8 ++++----
usr.bin/make/targ.c | 14 +++++++-------
6 files changed, 32 insertions(+), 31 deletions(-)
diffs (251 lines):
diff -r a5466ac1dd03 -r b2b57759a325 usr.bin/make/compat.c
--- a/usr.bin/make/compat.c Sun Aug 30 13:53:02 2020 +0000
+++ b/usr.bin/make/compat.c Sun Aug 30 14:11:42 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat.c,v 1.136 2020/08/30 11:12:05 rillig Exp $ */
+/* $NetBSD: compat.c,v 1.137 2020/08/30 14:11:42 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: compat.c,v 1.136 2020/08/30 11:12:05 rillig Exp $";
+static char rcsid[] = "$NetBSD: compat.c,v 1.137 2020/08/30 14:11:42 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: compat.c,v 1.136 2020/08/30 11:12:05 rillig Exp $");
+__RCSID("$NetBSD: compat.c,v 1.137 2020/08/30 14:11:42 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -529,7 +529,7 @@
goto cohorts;
}
- if (Lst_FindDatum(gn->iParents, pgn) != NULL) {
+ if (Lst_FindDatum(gn->implicitParents, pgn) != NULL) {
char *p1;
Var_Set(IMPSRC, Var_Value(TARGET, gn, &p1), pgn);
bmake_free(p1);
@@ -633,7 +633,7 @@
*/
pgn->flags &= ~(unsigned)REMAKE;
} else {
- if (Lst_FindDatum(gn->iParents, pgn) != NULL) {
+ if (Lst_FindDatum(gn->implicitParents, pgn) != NULL) {
char *p1;
const char *target = Var_Value(TARGET, gn, &p1);
Var_Set(IMPSRC, target != NULL ? target : "", pgn);
diff -r a5466ac1dd03 -r b2b57759a325 usr.bin/make/dir.c
--- a/usr.bin/make/dir.c Sun Aug 30 13:53:02 2020 +0000
+++ b/usr.bin/make/dir.c Sun Aug 30 14:11:42 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dir.c,v 1.126 2020/08/30 11:15:05 rillig Exp $ */
+/* $NetBSD: dir.c,v 1.127 2020/08/30 14:11:42 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: dir.c,v 1.126 2020/08/30 11:15:05 rillig Exp $";
+static char rcsid[] = "$NetBSD: dir.c,v 1.127 2020/08/30 14:11:42 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94";
#else
-__RCSID("$NetBSD: dir.c,v 1.126 2020/08/30 11:15:05 rillig Exp $");
+__RCSID("$NetBSD: dir.c,v 1.127 2020/08/30 14:11:42 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -1434,7 +1434,7 @@
else {
fullName = Dir_FindFile(gn->name, Suff_FindPath(gn));
if (fullName == NULL && gn->flags & FROM_DEPEND &&
- !Lst_IsEmpty(gn->iParents)) {
+ !Lst_IsEmpty(gn->implicitParents)) {
char *cp;
cp = strrchr(gn->name, '/');
diff -r a5466ac1dd03 -r b2b57759a325 usr.bin/make/make.c
--- a/usr.bin/make/make.c Sun Aug 30 13:53:02 2020 +0000
+++ b/usr.bin/make/make.c Sun Aug 30 14:11:42 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: make.c,v 1.132 2020/08/30 11:15:05 rillig Exp $ */
+/* $NetBSD: make.c,v 1.133 2020/08/30 14:11:42 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: make.c,v 1.132 2020/08/30 11:15:05 rillig Exp $";
+static char rcsid[] = "$NetBSD: make.c,v 1.133 2020/08/30 14:11:42 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)make.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: make.c,v 1.132 2020/08/30 11:15:05 rillig Exp $");
+__RCSID("$NetBSD: make.c,v 1.133 2020/08/30 14:11:42 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -695,7 +695,7 @@
{
GNode *pgn; /* the parent node */
const char *cname; /* the child's name */
- LstNode ln; /* Element in parents and iParents lists */
+ LstNode ln; /* Element in parents and implicitParents lists */
time_t mtime = -1;
char *p1;
Lst parents;
@@ -838,11 +838,11 @@
* Set the .PREFIX and .IMPSRC variables for all the implied parents
* of this node.
*/
- Lst_Open(cgn->iParents);
+ Lst_Open(cgn->implicitParents);
{
const char *cpref = Var_Value(PREFIX, cgn, &p1);
- while ((ln = Lst_Next(cgn->iParents)) != NULL) {
+ while ((ln = Lst_Next(cgn->implicitParents)) != NULL) {
pgn = LstNode_Datum(ln);
if (pgn->flags & REMAKE) {
Var_Set(IMPSRC, cname, pgn);
@@ -851,7 +851,7 @@
}
}
bmake_free(p1);
- Lst_Close(cgn->iParents);
+ Lst_Close(cgn->implicitParents);
}
}
diff -r a5466ac1dd03 -r b2b57759a325 usr.bin/make/make.h
--- a/usr.bin/make/make.h Sun Aug 30 13:53:02 2020 +0000
+++ b/usr.bin/make/make.h Sun Aug 30 14:11:42 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: make.h,v 1.132 2020/08/29 12:20:17 rillig Exp $ */
+/* $NetBSD: make.h,v 1.133 2020/08/30 14:11:42 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -293,9 +293,10 @@
time_t mtime; /* Its modification time */
struct GNode *cmgn; /* The youngest child */
- /* Links to parents for which this is an implied source. May be empty.
- * Nodes that depend on this, as gleaned from the transformation rules. */
- Lst iParents;
+ /* The GNodes for which this node is an implied source. May be empty.
+ * For example, when there is an inference rule for .c.o, the node for
+ * file.c has the node for file.o in this list. */
+ Lst implicitParents;
/* Other nodes of the same name for the :: operator. */
Lst cohorts;
diff -r a5466ac1dd03 -r b2b57759a325 usr.bin/make/suff.c
--- a/usr.bin/make/suff.c Sun Aug 30 13:53:02 2020 +0000
+++ b/usr.bin/make/suff.c Sun Aug 30 14:11:42 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: suff.c,v 1.138 2020/08/30 11:15:05 rillig Exp $ */
+/* $NetBSD: suff.c,v 1.139 2020/08/30 14:11:42 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: suff.c,v 1.138 2020/08/30 11:15:05 rillig Exp $";
+static char rcsid[] = "$NetBSD: suff.c,v 1.139 2020/08/30 14:11:42 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)suff.c 8.4 (Berkeley) 3/21/94";
#else
-__RCSID("$NetBSD: suff.c,v 1.138 2020/08/30 11:15:05 rillig Exp $");
+__RCSID("$NetBSD: suff.c,v 1.139 2020/08/30 14:11:42 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -1568,7 +1568,7 @@
* Keep track of another parent to which this beast is transformed so
* the .IMPSRC variable can be set correctly for the parent.
*/
- Lst_Append(sGn->iParents, tGn);
+ Lst_Append(sGn->implicitParents, tGn);
return TRUE;
}
diff -r a5466ac1dd03 -r b2b57759a325 usr.bin/make/targ.c
--- a/usr.bin/make/targ.c Sun Aug 30 13:53:02 2020 +0000
+++ b/usr.bin/make/targ.c Sun Aug 30 14:11:42 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: targ.c,v 1.79 2020/08/30 11:15:05 rillig Exp $ */
+/* $NetBSD: targ.c,v 1.80 2020/08/30 14:11:42 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: targ.c,v 1.79 2020/08/30 11:15:05 rillig Exp $";
+static char rcsid[] = "$NetBSD: targ.c,v 1.80 2020/08/30 14:11:42 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)targ.c 8.2 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: targ.c,v 1.79 2020/08/30 11:15:05 rillig Exp $");
+__RCSID("$NetBSD: targ.c,v 1.80 2020/08/30 14:11:42 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -205,7 +205,7 @@
gn->checked = 0;
gn->mtime = 0;
gn->cmgn = NULL;
- gn->iParents = Lst_Init();
+ gn->implicitParents = Lst_Init();
gn->cohorts = Lst_Init();
gn->parents = Lst_Init();
gn->children = Lst_Init();
@@ -236,7 +236,7 @@
free(gn->uname);
free(gn->path);
- Lst_Free(gn->iParents);
+ Lst_Free(gn->implicitParents);
Lst_Free(gn->cohorts);
Lst_Free(gn->parents);
Lst_Free(gn->children);
@@ -489,9 +489,9 @@
fprintf(debug_file, "# unmade\n");
}
}
- if (!Lst_IsEmpty(gn->iParents)) {
+ if (!Lst_IsEmpty(gn->implicitParents)) {
fprintf(debug_file, "# implicit parents: ");
- Lst_ForEach(gn->iParents, TargPrintName, NULL);
+ Lst_ForEach(gn->implicitParents, TargPrintName, NULL);
fprintf(debug_file, "\n");
}
} else {
Home |
Main Index |
Thread Index |
Old Index