Sun Aug 30 14:11:42 2020 UTC ()
make(1): rename GNode.iParents to implicitParents

The i alone was too ambiguous.  It could have meant ignore, implicit,
interactive, and probably many more.


(rillig)
diff -r1.136 -r1.137 src/usr.bin/make/compat.c
diff -r1.126 -r1.127 src/usr.bin/make/dir.c
diff -r1.132 -r1.133 src/usr.bin/make/make.c
diff -r1.132 -r1.133 src/usr.bin/make/make.h
diff -r1.138 -r1.139 src/usr.bin/make/suff.c
diff -r1.79 -r1.80 src/usr.bin/make/targ.c

cvs diff -r1.136 -r1.137 src/usr.bin/make/compat.c (expand / switch to context diff)
--- src/usr.bin/make/compat.c 2020/08/30 11:12:05 1.136
+++ src/usr.bin/make/compat.c 2020/08/30 14:11:42 1.137
@@ -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);

cvs diff -r1.126 -r1.127 src/usr.bin/make/dir.c (expand / switch to context diff)
--- src/usr.bin/make/dir.c 2020/08/30 11:15:05 1.126
+++ src/usr.bin/make/dir.c 2020/08/30 14:11:42 1.127
@@ -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, '/');

cvs diff -r1.132 -r1.133 src/usr.bin/make/make.c (expand / switch to context diff)
--- src/usr.bin/make/make.c 2020/08/30 11:15:05 1.132
+++ src/usr.bin/make/make.c 2020/08/30 14:11:42 1.133
@@ -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);
     }
 }
 

cvs diff -r1.132 -r1.133 src/usr.bin/make/make.h (expand / switch to context diff)
--- src/usr.bin/make/make.h 2020/08/29 12:20:17 1.132
+++ src/usr.bin/make/make.h 2020/08/30 14:11:42 1.133
@@ -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;

cvs diff -r1.138 -r1.139 src/usr.bin/make/suff.c (expand / switch to context diff)
--- src/usr.bin/make/suff.c 2020/08/30 11:15:05 1.138
+++ src/usr.bin/make/suff.c 2020/08/30 14:11:42 1.139
@@ -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;
 }

cvs diff -r1.79 -r1.80 src/usr.bin/make/targ.c (expand / switch to context diff)
--- src/usr.bin/make/targ.c 2020/08/30 11:15:05 1.79
+++ src/usr.bin/make/targ.c 2020/08/30 14:11:42 1.80
@@ -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 {