make(1): rename GNode.iParents to implicitParents

The i alone was too ambiguous.  It could have meant ignore, implicit,
interactive, and probably many more.
This commit is contained in:
rillig 2020-08-30 14:11:42 +00:00
parent 2b7542e41b
commit f8cb0fda82
6 changed files with 32 additions and 31 deletions

View File

@ -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 @@ Compat_Make(void *gnp, void *pgnp)
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 @@ Compat_Make(void *gnp, void *pgnp)
*/
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);

View File

@ -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 @@ Dir_MTime(GNode *gn, Boolean recheck)
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, '/');

View File

@ -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 @@ Make_Update(GNode *cgn)
{
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 @@ Make_Update(GNode *cgn)
* 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 @@ Make_Update(GNode *cgn)
}
}
bmake_free(p1);
Lst_Close(cgn->iParents);
Lst_Close(cgn->implicitParents);
}
}

View File

@ -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 @@ typedef struct GNode {
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;

View File

@ -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 @@ SuffApplyTransform(GNode *tGn, GNode *sGn, Suff *t, Suff *s)
* 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;
}

View File

@ -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 @@ Targ_NewGN(const char *name)
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 @@ TargFreeGN(void *gnp)
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 @@ Targ_PrintNode(void *gnp, void *passp)
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 {