Module Name:    src
Committed By:   rillig
Date:           Sun Nov 28 19:51:06 UTC 2021

Modified Files:
        src/usr.bin/make: arch.c compat.c dir.c job.c make.c make.h targ.c

Log Message:
make: convert GNodeFlags from enum into bit-fields

Now that Enum_ToString is implemented for each type separately, it's
easy to convert them to bit-fields.  This gets rid of the magic numbers
12 for CYCLE and 13 for DONECYCLE that left a suspicious gap in the
numbers.  This gap was not needed since the code didn't make use of the
relative ordering of the enum constants.

The effects of this conversion are fewer capital letters in the code,
smaller scope for the GNode flags, and clearer code especially when
setting a flag back to false.

One strange thing is that GCC 10.3.0 doesn't optimize GNodeFlags_IsNone
to an single bitmasking instruction, at least on x86_64.  Instead it
generates a testb instruction for each of the flags, even loading bit 8
separately from the others.  Clang 12.0.1 knows this optimization
though and generates the obvious sequence of movzwl, testl, jz.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.203 -r1.204 src/usr.bin/make/arch.c
cvs rdiff -u -r1.227 -r1.228 src/usr.bin/make/compat.c
cvs rdiff -u -r1.273 -r1.274 src/usr.bin/make/dir.c
cvs rdiff -u -r1.439 -r1.440 src/usr.bin/make/job.c
cvs rdiff -u -r1.245 -r1.246 src/usr.bin/make/make.c
cvs rdiff -u -r1.267 -r1.268 src/usr.bin/make/make.h
cvs rdiff -u -r1.172 -r1.173 src/usr.bin/make/targ.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/arch.c
diff -u src/usr.bin/make/arch.c:1.203 src/usr.bin/make/arch.c:1.204
--- src/usr.bin/make/arch.c:1.203	Wed Aug 25 22:14:38 2021
+++ src/usr.bin/make/arch.c	Sun Nov 28 19:51:06 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: arch.c,v 1.203 2021/08/25 22:14:38 rillig Exp $	*/
+/*	$NetBSD: arch.c,v 1.204 2021/11/28 19:51:06 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -126,7 +126,7 @@
 #include "config.h"
 
 /*	"@(#)arch.c	8.2 (Berkeley) 1/2/94"	*/
-MAKE_RCSID("$NetBSD: arch.c,v 1.203 2021/08/25 22:14:38 rillig Exp $");
+MAKE_RCSID("$NetBSD: arch.c,v 1.204 2021/11/28 19:51:06 rillig Exp $");
 
 typedef struct List ArchList;
 typedef struct ListNode ArchListNode;
@@ -944,12 +944,12 @@ Arch_UpdateMemberMTime(GNode *gn)
 			const char *nameEnd = strchr(nameStart, ')');
 			size_t nameLen = (size_t)(nameEnd - nameStart);
 
-			if ((pgn->flags & REMAKE) &&
+			if (pgn->flags.remake &&
 			    strncmp(nameStart, gn->name, nameLen) == 0) {
 				Arch_UpdateMTime(pgn);
 				gn->mtime = pgn->mtime;
 			}
-		} else if (pgn->flags & REMAKE) {
+		} else if (pgn->flags.remake) {
 			/*
 			 * Something which isn't a library depends on the
 			 * existence of this target, so it needs to exist.

Index: src/usr.bin/make/compat.c
diff -u src/usr.bin/make/compat.c:1.227 src/usr.bin/make/compat.c:1.228
--- src/usr.bin/make/compat.c:1.227	Tue Apr 27 15:19:25 2021
+++ src/usr.bin/make/compat.c	Sun Nov 28 19:51:06 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat.c,v 1.227 2021/04/27 15:19:25 christos Exp $	*/
+/*	$NetBSD: compat.c,v 1.228 2021/11/28 19:51:06 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -96,7 +96,7 @@
 #include "pathnames.h"
 
 /*	"@(#)compat.c	8.2 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: compat.c,v 1.227 2021/04/27 15:19:25 christos Exp $");
+MAKE_RCSID("$NetBSD: compat.c,v 1.228 2021/11/28 19:51:06 rillig Exp $");
 
 static GNode *curTarg = NULL;
 static pid_t compatChild;
@@ -494,7 +494,7 @@ MakeUnmade(GNode *gn, GNode *pgn)
 	 * again. This is our signal to not attempt to do anything but abort
 	 * our parent as well.
 	 */
-	gn->flags |= REMAKE;
+	gn->flags.remake = true;
 	gn->made = BEINGMADE;
 
 	if (!(gn->type & OP_MADE))
@@ -502,9 +502,9 @@ MakeUnmade(GNode *gn, GNode *pgn)
 
 	MakeNodes(&gn->children, gn);
 
-	if (!(gn->flags & REMAKE)) {
+	if (!gn->flags.remake) {
 		gn->made = ABORTED;
-		pgn->flags &= ~(unsigned)REMAKE;
+		pgn->flags.remake = false;
 		return false;
 	}
 
@@ -582,13 +582,13 @@ MakeUnmade(GNode *gn, GNode *pgn)
 		 */
 		gn->made = MADE;
 		if (Make_Recheck(gn) == 0)
-			pgn->flags |= FORCE;
+			pgn->flags.force = true;
 		if (!(gn->type & OP_EXEC)) {
-			pgn->flags |= CHILDMADE;
+			pgn->flags.childMade = true;
 			GNode_UpdateYoungestChild(pgn, gn);
 		}
 	} else if (opts.keepgoing) {
-		pgn->flags &= ~(unsigned)REMAKE;
+		pgn->flags.remake = false;
 	} else {
 		PrintOnError(gn, "\nStop.");
 		exit(1);
@@ -609,11 +609,11 @@ MakeOther(GNode *gn, GNode *pgn)
 	case BEINGMADE:
 		Error("Graph cycles through %s", gn->name);
 		gn->made = ERROR;
-		pgn->flags &= ~(unsigned)REMAKE;
+		pgn->flags.remake = false;
 		break;
 	case MADE:
 		if (!(gn->type & OP_EXEC)) {
-			pgn->flags |= CHILDMADE;
+			pgn->flags.childMade = true;
 			GNode_UpdateYoungestChild(pgn, gn);
 		}
 		break;
@@ -660,7 +660,7 @@ Compat_Make(GNode *gn, GNode *pgn)
 		 * Already had an error when making this.
 		 * Tell the parent to abort.
 		 */
-		pgn->flags &= ~(unsigned)REMAKE;
+		pgn->flags.remake = false;
 	} else {
 		MakeOther(gn, pgn);
 	}

Index: src/usr.bin/make/dir.c
diff -u src/usr.bin/make/dir.c:1.273 src/usr.bin/make/dir.c:1.274
--- src/usr.bin/make/dir.c:1.273	Tue Sep 21 21:39:32 2021
+++ src/usr.bin/make/dir.c	Sun Nov 28 19:51:06 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: dir.c,v 1.273 2021/09/21 21:39:32 rillig Exp $	*/
+/*	$NetBSD: dir.c,v 1.274 2021/11/28 19:51:06 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -138,7 +138,7 @@
 #include "job.h"
 
 /*	"@(#)dir.c	8.2 (Berkeley) 1/2/94"	*/
-MAKE_RCSID("$NetBSD: dir.c,v 1.273 2021/09/21 21:39:32 rillig Exp $");
+MAKE_RCSID("$NetBSD: dir.c,v 1.274 2021/11/28 19:51:06 rillig Exp $");
 
 /*
  * A search path is a list of CachedDir structures. A CachedDir has in it the
@@ -1447,7 +1447,7 @@ ResolveFullName(GNode *gn)
 
 		fullName = Dir_FindFile(gn->name, Suff_FindPath(gn));
 
-		if (fullName == NULL && gn->flags & FROM_DEPEND &&
+		if (fullName == NULL && gn->flags.fromDepend &&
 		    !Lst_IsEmpty(&gn->implicitParents))
 			fullName = ResolveMovedDepends(gn);
 

Index: src/usr.bin/make/job.c
diff -u src/usr.bin/make/job.c:1.439 src/usr.bin/make/job.c:1.440
--- src/usr.bin/make/job.c:1.439	Sun Nov 28 17:26:07 2021
+++ src/usr.bin/make/job.c	Sun Nov 28 19:51:06 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: job.c,v 1.439 2021/11/28 17:26:07 rillig Exp $	*/
+/*	$NetBSD: job.c,v 1.440 2021/11/28 19:51:06 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -142,7 +142,7 @@
 #include "trace.h"
 
 /*	"@(#)job.c	8.2 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: job.c,v 1.439 2021/11/28 17:26:07 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.440 2021/11/28 19:51:06 rillig Exp $");
 
 /*
  * A shell defines how the commands are run.  All commands for a target are
@@ -1367,7 +1367,7 @@ Job_CheckCommands(GNode *gn, void (*abor
 	 * this node's parents so they never get examined.
 	 */
 
-	if (gn->flags & FROM_DEPEND) {
+	if (gn->flags.fromDepend) {
 		if (!Job_RunTarget(".STALE", gn->fname))
 			fprintf(stdout,
 			    "%s: %s, %d: ignoring stale %s for %s\n",

Index: src/usr.bin/make/make.c
diff -u src/usr.bin/make/make.c:1.245 src/usr.bin/make/make.c:1.246
--- src/usr.bin/make/make.c:1.245	Sun Nov 28 18:58:58 2021
+++ src/usr.bin/make/make.c	Sun Nov 28 19:51:06 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: make.c,v 1.245 2021/11/28 18:58:58 rillig Exp $	*/
+/*	$NetBSD: make.c,v 1.246 2021/11/28 19:51:06 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -104,7 +104,7 @@
 #include "job.h"
 
 /*	"@(#)make.c	8.1 (Berkeley) 6/6/93"	*/
-MAKE_RCSID("$NetBSD: make.c,v 1.245 2021/11/28 18:58:58 rillig Exp $");
+MAKE_RCSID("$NetBSD: make.c,v 1.246 2021/11/28 19:51:06 rillig Exp $");
 
 /* Sequence # to detect recursion. */
 static unsigned int checked_seqno = 1;
@@ -196,16 +196,16 @@ GNodeFlags_ToString(GNodeFlags flags, vo
 	Buffer buf;
 
 	Buf_InitSize(&buf, 32);
-#define ADD(flag) Buf_AddFlag(&buf, (flags & (flag)) != 0, #flag)
-	ADD(REMAKE);
-	ADD(CHILDMADE);
-	ADD(FORCE);
-	ADD(DONE_WAIT);
-	ADD(DONE_ORDER);
-	ADD(FROM_DEPEND);
-	ADD(DONE_ALLSRC);
-	ADD(CYCLE);
-	ADD(DONECYCLE);
+#define ADD(flag, name) Buf_AddFlag(&buf, flags.flag, name)
+	ADD(remake, "REMAKE");
+	ADD(childMade, "CHILDMADE");
+	ADD(force, "FORCE");
+	ADD(doneWait, "DONE_WAIT");
+	ADD(doneOrder, "DONE_ORDER");
+	ADD(fromDepend, "FROM_DEPEND");
+	ADD(doneAllsrc, "DONE_ALLSRC");
+	ADD(cycle, "CYCLE");
+	ADD(doneCycle, "DONECYCLE");
 #undef ADD
 	return buf.len == 0 ? "none" : (*freeIt = Buf_DoneData(&buf));
 }
@@ -344,8 +344,8 @@ GNode_IsOODate(GNode *gn)
 		 */
 		DEBUG0(MAKE, ".JOIN node...");
 		DEBUG1(MAKE, "source %smade...",
-		    gn->flags & CHILDMADE ? "" : "not ");
-		oodate = (gn->flags & CHILDMADE) != 0;
+		    gn->flags.childMade ? "" : "not ");
+		oodate = gn->flags.childMade;
 	} else if (gn->type & (OP_FORCE | OP_EXEC | OP_PHONY)) {
 		/*
 		 * A node which is the object of the force (!) operator or
@@ -373,10 +373,10 @@ GNode_IsOODate(GNode *gn)
 		 * child after it was considered made.
 		 */
 		if (DEBUG(MAKE)) {
-			if (gn->flags & FORCE)
+			if (gn->flags.force)
 				debug_printf("non existing child...");
 		}
-		oodate = (gn->flags & FORCE) != 0;
+		oodate = gn->flags.force;
 	}
 
 #ifdef USE_META
@@ -626,7 +626,7 @@ UpdateImplicitParentsVars(GNode *cgn, co
 
 	for (ln = cgn->implicitParents.first; ln != NULL; ln = ln->next) {
 		GNode *pgn = ln->datum;
-		if (pgn->flags & REMAKE) {
+		if (pgn->flags.remake) {
 			Var_Set(pgn, IMPSRC, cname);
 			if (cpref != NULL)
 				Var_Set(pgn, PREFIX, cpref);
@@ -643,7 +643,7 @@ IsWaitingForOrder(GNode *gn)
 	for (ln = gn->order_pred.first; ln != NULL; ln = ln->next) {
 		GNode *ogn = ln->datum;
 
-		if (GNode_IsDone(ogn) || !(ogn->flags & REMAKE))
+		if (GNode_IsDone(ogn) || !ogn->flags.remake)
 			continue;
 
 		DEBUG2(MAKE,
@@ -742,13 +742,13 @@ Make_Update(GNode *cgn)
 			debug_printf(", unmade %d ", pgn->unmade - 1);
 		}
 
-		if (!(pgn->flags & REMAKE)) {
+		if (!pgn->flags.remake) {
 			/* This parent isn't needed */
 			DEBUG0(MAKE, "- not needed\n");
 			continue;
 		}
 		if (mtime == 0 && !(cgn->type & OP_WAIT))
-			pgn->flags |= FORCE;
+			pgn->flags.force = true;
 
 		/*
 		 * If the parent has the .MADE attribute, its timestamp got
@@ -765,7 +765,7 @@ Make_Update(GNode *cgn)
 
 		if (!(cgn->type & (OP_EXEC | OP_USE | OP_USEBEFORE))) {
 			if (cgn->made == MADE)
-				pgn->flags |= CHILDMADE;
+				pgn->flags.childMade = true;
 			GNode_UpdateYoungestChild(pgn, cgn);
 		}
 
@@ -798,7 +798,7 @@ Make_Update(GNode *cgn)
 		 * nodes.
 		 */
 		if (pgn->unmade != 0 && !(centurion->type & OP_WAIT)
-		    && !(centurion->flags & DONE_ORDER)) {
+		    && !centurion->flags.doneOrder) {
 			DEBUG0(MAKE, "- unmade children\n");
 			continue;
 		}
@@ -931,7 +931,7 @@ GNode_SetLocalVars(GNode *gn)
 {
 	GNodeListNode *ln;
 
-	if (gn->flags & DONE_ALLSRC)
+	if (gn->flags.doneAllsrc)
 		return;
 
 	UnmarkChildren(gn);
@@ -945,7 +945,7 @@ GNode_SetLocalVars(GNode *gn)
 
 	if (gn->type & OP_JOIN)
 		Var_Set(gn, TARGET, GNode_VarAllsrc(gn));
-	gn->flags |= DONE_ALLSRC;
+	gn->flags.doneAllsrc = true;
 }
 
 static bool
@@ -1000,7 +1000,7 @@ MakeBuildParent(GNode *pn, GNodeListNode
 
 	if (!MakeBuildChild(pn, toBeMadeNext)) {
 		/* When this node is built, reschedule its parents. */
-		pn->flags |= DONE_ORDER;
+		pn->flags.doneOrder = true;
 	}
 }
 
@@ -1143,7 +1143,7 @@ static void MakePrintStatusList(GNodeLis
 static bool
 MakePrintStatus(GNode *gn, int *errors)
 {
-	if (gn->flags & DONECYCLE) {
+	if (gn->flags.doneCycle) {
 		/*
 		 * We've completely processed this node before, don't do
 		 * it again.
@@ -1152,7 +1152,7 @@ MakePrintStatus(GNode *gn, int *errors)
 	}
 
 	if (gn->unmade == 0) {
-		gn->flags |= DONECYCLE;
+		gn->flags.doneCycle = true;
 		switch (gn->made) {
 		case UPTODATE:
 			printf("`%s%s' is up to date.\n", gn->name,
@@ -1196,17 +1196,17 @@ MakePrintStatus(GNode *gn, int *errors)
 	 * If printing cycles and came to one that has unmade children,
 	 * print out the cycle by recursing on its children.
 	 */
-	if (!(gn->flags & CYCLE)) {
+	if (!gn->flags.cycle) {
 		/* First time we've seen this node, check all children */
-		gn->flags |= CYCLE;
+		gn->flags.cycle = true;
 		MakePrintStatusList(&gn->children, errors);
 		/* Mark that this node needn't be processed again */
-		gn->flags |= DONECYCLE;
+		gn->flags.doneCycle = true;
 		return false;
 	}
 
 	/* Only output the error once per node */
-	gn->flags |= DONECYCLE;
+	gn->flags.doneCycle = true;
 	Error("Graph cycles through `%s%s'", gn->name, gn->cohort_num);
 	if ((*errors)++ > 100)
 		/* Abandon the whole error report */
@@ -1235,7 +1235,7 @@ ExamineLater(GNodeList *examine, GNodeLi
 	for (ln = toBeExamined->first; ln != NULL; ln = ln->next) {
 		GNode *gn = ln->datum;
 
-		if (gn->flags & REMAKE)
+		if (gn->flags.remake)
 			continue;
 		if (gn->type & (OP_USE | OP_USEBEFORE))
 			continue;
@@ -1271,10 +1271,10 @@ Make_ExpandUse(GNodeList *targs)
 	while (!Lst_IsEmpty(&examine)) {
 		GNode *gn = Lst_Dequeue(&examine);
 
-		if (gn->flags & REMAKE)
+		if (gn->flags.remake)
 			/* We've looked at this one already */
 			continue;
-		gn->flags |= REMAKE;
+		gn->flags.remake = true;
 		DEBUG2(MAKE, "Make_ExpandUse: examine %s%s\n",
 		    gn->name, gn->cohort_num);
 
@@ -1359,7 +1359,7 @@ Make_ProcessWait(GNodeList *targs)
 	 */
 
 	pgn = GNode_New(".MAIN");
-	pgn->flags = REMAKE;
+	pgn->flags.remake = true;
 	pgn->type = OP_PHONY | OP_DEPENDS;
 	/* Get it displayed in the diag dumps */
 	Lst_Prepend(Targ_List(), pgn);
@@ -1387,9 +1387,9 @@ Make_ProcessWait(GNodeList *targs)
 		pgn = Lst_Dequeue(&examine);
 
 		/* We only want to process each child-list once */
-		if (pgn->flags & DONE_WAIT)
+		if (pgn->flags.doneWait)
 			continue;
-		pgn->flags |= DONE_WAIT;
+		pgn->flags.doneWait = true;
 		DEBUG1(MAKE, "Make_ProcessWait: examine %s\n", pgn->name);
 
 		if (pgn->type & OP_DOUBLEDEP)

Index: src/usr.bin/make/make.h
diff -u src/usr.bin/make/make.h:1.267 src/usr.bin/make/make.h:1.268
--- src/usr.bin/make/make.h:1.267	Sun Nov 28 18:58:58 2021
+++ src/usr.bin/make/make.h	Sun Nov 28 19:51:06 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: make.h,v 1.267 2021/11/28 18:58:58 rillig Exp $	*/
+/*	$NetBSD: make.h,v 1.268 2021/11/28 19:51:06 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -321,26 +321,25 @@ typedef enum GNodeType {
 	OP_NOTARGET	= OP_NOTMAIN | OP_USE | OP_EXEC | OP_TRANSFORM
 } GNodeType;
 
-typedef enum GNodeFlags {
-	GNF_NONE	= 0,
+typedef struct GNodeFlagsS {
 	/* this target needs to be (re)made */
-	REMAKE		= 1 << 0,
+	bool remake:1;
 	/* children of this target were made */
-	CHILDMADE	= 1 << 1,
+	bool childMade:1;
 	/* children don't exist, and we pretend made */
-	FORCE		= 1 << 2,
+	bool force:1;
 	/* Set by Make_ProcessWait() */
-	DONE_WAIT	= 1 << 3,
+	bool doneWait:1;
 	/* Build requested by .ORDER processing */
-	DONE_ORDER	= 1 << 4,
+	bool doneOrder:1;
 	/* Node created from .depend */
-	FROM_DEPEND	= 1 << 5,
+	bool fromDepend:1;
 	/* We do it once only */
-	DONE_ALLSRC	= 1 << 6,
+	bool doneAllsrc:1;
 	/* Used by MakePrintStatus */
-	CYCLE		= 1 << 12,
+	bool cycle:1;
 	/* Used by MakePrintStatus */
-	DONECYCLE	= 1 << 13
+	bool doneCycle:1;
 } GNodeFlags;
 
 typedef struct List StringList;
@@ -719,7 +718,7 @@ GNode_Path(const GNode *gn)
 MAKE_INLINE bool
 GNode_IsWaitingFor(const GNode *gn)
 {
-	return (gn->flags & REMAKE) && gn->made <= REQUESTED;
+	return gn->flags.remake && gn->made <= REQUESTED;
 }
 
 MAKE_INLINE bool

Index: src/usr.bin/make/targ.c
diff -u src/usr.bin/make/targ.c:1.172 src/usr.bin/make/targ.c:1.173
--- src/usr.bin/make/targ.c:1.172	Sun Sep 12 08:32:23 2021
+++ src/usr.bin/make/targ.c	Sun Nov 28 19:51:06 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: targ.c,v 1.172 2021/09/12 08:32:23 rillig Exp $	*/
+/*	$NetBSD: targ.c,v 1.173 2021/11/28 19:51:06 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -113,7 +113,7 @@
 #include "dir.h"
 
 /*	"@(#)targ.c	8.2 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: targ.c,v 1.172 2021/09/12 08:32:23 rillig Exp $");
+MAKE_RCSID("$NetBSD: targ.c,v 1.173 2021/11/28 19:51:06 rillig Exp $");
 
 /*
  * All target nodes that appeared on the left-hand side of one of the
@@ -187,7 +187,7 @@ GNode_New(const char *name)
 	gn->uname = NULL;
 	gn->path = NULL;
 	gn->type = name[0] == '-' && name[1] == 'l' ? OP_LIB : OP_NONE;
-	gn->flags = GNF_NONE;
+	memset(&gn->flags, 0, sizeof(gn->flags));
 	gn->made = UNMADE;
 	gn->unmade = 0;
 	gn->mtime = 0;
@@ -309,7 +309,7 @@ Targ_NewInternalNode(const char *name)
 	Lst_Append(&allTargets, gn);
 	DEBUG1(TARG, "Adding \"%s\" to all targets.\n", gn->name);
 	if (doing_depend)
-		gn->flags |= FROM_DEPEND;
+		gn->flags.fromDepend = true;
 	return gn;
 }
 
@@ -481,13 +481,27 @@ GNode_OpName(const GNode *gn)
 	return "";
 }
 
+static bool
+GNodeFlags_IsNone(GNodeFlags flags)
+{
+	return !flags.remake
+	       && !flags.childMade
+	       && !flags.force
+	       && !flags.doneWait
+	       && !flags.doneOrder
+	       && !flags.fromDepend
+	       && !flags.doneAllsrc
+	       && !flags.cycle
+	       && !flags.doneCycle;
+}
+
 /* Print the contents of a node. */
 void
 Targ_PrintNode(GNode *gn, int pass)
 {
 	debug_printf("# %s%s", gn->name, gn->cohort_num);
 	GNode_FprintDetails(opts.debug_file, ", ", gn, "\n");
-	if (gn->flags == 0)
+	if (GNodeFlags_IsNone(gn->flags))
 		return;
 
 	if (!GNode_IsTarget(gn))

Reply via email to