diff --git a/usr.bin/make/compat.c b/usr.bin/make/compat.c index 192115323fa8..de335cfd6e2b 100644 --- a/usr.bin/make/compat.c +++ b/usr.bin/make/compat.c @@ -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 #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); diff --git a/usr.bin/make/dir.c b/usr.bin/make/dir.c index dd4fce6f9bcd..bb5292732bb2 100644 --- a/usr.bin/make/dir.c +++ b/usr.bin/make/dir.c @@ -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 #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, '/'); diff --git a/usr.bin/make/make.c b/usr.bin/make/make.c index 0c51b4f0ea20..da2b8adf6efd 100644 --- a/usr.bin/make/make.c +++ b/usr.bin/make/make.c @@ -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 #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); } } diff --git a/usr.bin/make/make.h b/usr.bin/make/make.h index a2677cb2bd31..565fc1d5296c 100644 --- a/usr.bin/make/make.h +++ b/usr.bin/make/make.h @@ -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; diff --git a/usr.bin/make/suff.c b/usr.bin/make/suff.c index 3eafada78169..2b16866026d0 100644 --- a/usr.bin/make/suff.c +++ b/usr.bin/make/suff.c @@ -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 #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; } diff --git a/usr.bin/make/targ.c b/usr.bin/make/targ.c index 21022d50e5bd..ed86b9316d3a 100644 --- a/usr.bin/make/targ.c +++ b/usr.bin/make/targ.c @@ -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 #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 {