aboutsummaryrefslogtreecommitdiff
path: root/contrib/bmake/targ.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bmake/targ.c')
-rw-r--r--contrib/bmake/targ.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/contrib/bmake/targ.c b/contrib/bmake/targ.c
index 7ce495c73b01..14c7faba1f2b 100644
--- a/contrib/bmake/targ.c
+++ b/contrib/bmake/targ.c
@@ -1,4 +1,4 @@
-/* $NetBSD: targ.c,v 1.177 2022/04/15 12:19:28 rillig Exp $ */
+/* $NetBSD: targ.c,v 1.180 2024/03/10 02:53:37 sjg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -107,7 +107,7 @@
#include "dir.h"
/* "@(#)targ.c 8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: targ.c,v 1.177 2022/04/15 12:19:28 rillig Exp $");
+MAKE_RCSID("$NetBSD: targ.c,v 1.180 2024/03/10 02:53:37 sjg Exp $");
/*
* All target nodes that appeared on the left-hand side of one of the
@@ -159,17 +159,17 @@ Targ_List(void)
/*
* Create a new graph node, but don't register it anywhere.
*
- * Graph nodes that appear on the left-hand side of a dependency line such
+ * Graph nodes that occur on the left-hand side of a dependency line such
* as "target: source" are called targets. XXX: In some cases (like the
- * .ALLTARGETS variable), all nodes are called targets as well, even if they
- * never appear on the left-hand side. This is a mistake.
+ * .ALLTARGETS variable), other nodes are called targets as well, even if
+ * they never occur on the left-hand side of a dependency line.
*
* Typical names for graph nodes are:
- * "src.c" (an ordinary file)
- * "clean" (a .PHONY target)
- * ".END" (a special hook target)
- * "-lm" (a library)
- * "libc.a(isspace.o)" (an archive member)
+ * "src.c" an ordinary file
+ * "clean" a .PHONY target
+ * ".END" a special hook target
+ * "-lm" a library
+ * "libm.a(sin.o)" an archive member
*/
GNode *
GNode_New(const char *name)
@@ -201,6 +201,7 @@ GNode_New(const char *name)
gn->suffix = NULL;
gn->fname = NULL;
gn->lineno = 0;
+ gn->exit_status = 0;
#ifdef CLEANUP
Lst_Append(&allNodes, gn);
@@ -242,9 +243,9 @@ GNode_Free(void *gnp)
*
* XXX: The GNodes that are only used as variable scopes (SCOPE_CMD,
* SCOPE_GLOBAL, SCOPE_INTERNAL) are not freed at all (see Var_End,
- * where they are not mentioned). These might be freed at all, if
- * their variable values are indeed not used anywhere else (see
- * Trace_Init for the only suspicious use).
+ * where they are not mentioned). These may be freed if their
+ * variable values are indeed not used anywhere else (see Trace_Init
+ * for the only suspicious use).
*/
HashTable_Done(&gn->vars);
@@ -599,7 +600,7 @@ Targ_Propagate(void)
for (cln = gn->cohorts.first; cln != NULL; cln = cln->next) {
GNode *cohort = cln->datum;
- cohort->type |= type & ~OP_OPMASK;
+ cohort->type |= type & (unsigned)~OP_OPMASK;
}
}
}