diff options
Diffstat (limited to 'usr.bin/make/make.c')
-rw-r--r-- | usr.bin/make/make.c | 51 |
1 files changed, 25 insertions, 26 deletions
diff --git a/usr.bin/make/make.c b/usr.bin/make/make.c index 805c96d6f76..11887103adc 100644 --- a/usr.bin/make/make.c +++ b/usr.bin/make/make.c @@ -1,9 +1,9 @@ -/* $OpenBSD: make.c,v 1.3 1996/09/02 16:04:14 briggs Exp $ */ -/* $NetBSD: make.c,v 1.9 1996/08/30 23:21:10 christos Exp $ */ +/* $OpenBSD: make.c,v 1.4 1996/11/30 21:09:00 millert Exp $ */ +/* $NetBSD: make.c,v 1.10 1996/11/06 17:59:15 christos Exp $ */ /* - * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. - * Copyright (c) 1988, 1989 by Adam de Boor + * Copyright (c) 1988, 1989, 1990, 1993 + * The Regents of the University of California. All rights reserved. * Copyright (c) 1989 by Berkeley Softworks * All rights reserved. * @@ -41,10 +41,9 @@ #ifndef lint #if 0 -static char sccsid[] = "@(#)make.c 5.3 (Berkeley) 6/1/90"; -static char rcsid[] = "$NetBSD: make.c,v 1.8 1996/03/15 21:52:37 christos Exp $"; +static char sccsid[] = "@(#)make.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: make.c,v 1.3 1996/09/02 16:04:14 briggs Exp $"; +static char rcsid[] = "$OpenBSD: make.c,v 1.4 1996/11/30 21:09:00 millert Exp $"; #endif #endif /* not lint */ @@ -104,10 +103,10 @@ static int MakePrintStatus __P((ClientData, ClientData)); *----------------------------------------------------------------------- * Make_TimeStamp -- * Set the cmtime field of a parent node based on the mtime stamp in its - * child. Called from MakeOODate via Lst_ForEach. + * child. Called from MakeOODate via Lst_ForEach. * * Results: - * Always returns 0. + * Always returns 0. * * Side Effects: * The cmtime of the parent node will be changed if the mtime @@ -144,7 +143,7 @@ MakeTimeStamp (pgn, cgn) * will have been recreated. * * Results: - * TRUE if the node is out of date. FALSE otherwise. + * TRUE if the node is out of date. FALSE otherwise. * * Side Effects: * The mtime field of the node and the cmtime field of its parents @@ -195,7 +194,7 @@ Make_OODate (gn) printf(".USE node..."); } oodate = FALSE; - } else if (gn->type & OP_LIB) { + } else if ((gn->type & OP_LIB) && Arch_IsLib(gn)) { if (DEBUG(MAKE)) { printf("library..."); } @@ -342,7 +341,7 @@ Make_HandleUse (cgn, pgn) */ (void) Lst_Concat (pgn->commands, cgn->commands, LST_CONCNEW); } - + if (Lst_Open (cgn->children) == SUCCESS) { while ((ln = Lst_Next (cgn->children)) != NILLNODE) { gn = (GNode *)Lst_Datum (ln); @@ -355,7 +354,7 @@ Make_HandleUse (cgn, pgn) } Lst_Close (cgn->children); } - + pgn->type |= cgn->type & ~(OP_OPMASK|OP_USE|OP_TRANSFORM); /* @@ -384,7 +383,7 @@ MakeHandleUse (pgn, cgn) * Make_Update -- * Perform update on the parents of a node. Used by JobFinish once * a node has been dealt with and by MakeStartJobs if it finds an - * up-to-date node. + * up-to-date node. * * Results: * Always returns 0 @@ -483,7 +482,7 @@ Make_Update (cgn) } #endif } - + if (Lst_Open (cgn->parents) == SUCCESS) { while ((ln = Lst_Next (cgn->parents)) != NILLNODE) { pgn = (GNode *)Lst_Datum (ln); @@ -528,7 +527,7 @@ Make_Update (cgn) (void)Lst_EnQueue(toBeMade, (ClientData)succ); } } - + /* * Set the .PREFIX and .IMPSRC variables for all the implied parents * of this node. @@ -685,7 +684,7 @@ static Boolean MakeStartJobs () { register GNode *gn; - + while (!Job_Full() && !Lst_IsEmpty (toBeMade)) { gn = (GNode *) Lst_DeQueue (toBeMade); if (DEBUG(MAKE)) { @@ -718,7 +717,7 @@ MakeStartJobs () continue; } } - + numNodes--; if (Make_OODate (gn)) { if (DEBUG(MAKE)) { @@ -743,7 +742,7 @@ MakeStartJobs () */ Make_DoAllVar (gn); } - + Make_Update (gn); } } @@ -838,22 +837,22 @@ Make_Run (targs) examine = Lst_Duplicate(targs, NOCOPY); numNodes = 0; - + /* * Make an initial downward pass over the graph, marking nodes to be made * as we go down. We call Suff_FindDeps to find where a node is and * to get some children for it if it has none and also has no commands. * If the node is a leaf, we stick it on the toBeMade queue to * be looked at in a minute, otherwise we add its children to our queue - * and go on about our business. + * and go on about our business. */ while (!Lst_IsEmpty (examine)) { gn = (GNode *) Lst_DeQueue (examine); - + if (!gn->make) { gn->make = TRUE; numNodes++; - + /* * Apply any .USE rules before looking for implicit dependencies * to make sure everything has commands that should... @@ -868,7 +867,7 @@ Make_Run (targs) } } } - + Lst_Destroy (examine, NOFREE); if (queryFlag) { @@ -884,7 +883,7 @@ Make_Run (targs) * get started, nothing will happen since the remaining upward * traversal of the graph is performed by the routines in job.c upon * the finishing of a job. So we fill the Job table as much as we can - * before going into our loop. + * before going into our loop. */ (void) MakeStartJobs(); } @@ -913,6 +912,6 @@ Make_Run (targs) */ errors = ((errors == 0) && (numNodes != 0)); Lst_ForEach(targs, MakePrintStatus, (ClientData) &errors); - + return (TRUE); } |