diff options
| author | christos <christos@NetBSD.org> | 1996-11-06 17:58:58 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 1996-11-06 17:58:58 +0000 |
| commit | aa49881371f8fb4d3ea903d9f481fcaddfb869ea (patch) | |
| tree | bb03e3e2b0608049e1abea489586c7115950cc0d /usr.bin/make/make.c | |
| parent | dce3bea50b3400f3fe3a7978a7a37dd33a6279a1 (diff) | |
- Merge in FreeBSD and Lite2 changes.
- Fix bug where a non-archive target with a .a suffix would always
be considered to be out of date, since it does not have a TOC.
Diffstat (limited to 'usr.bin/make/make.c')
| -rw-r--r-- | usr.bin/make/make.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/usr.bin/make/make.c b/usr.bin/make/make.c index 2bfd4b94b0b..2244bccf193 100644 --- a/usr.bin/make/make.c +++ b/usr.bin/make/make.c @@ -1,8 +1,8 @@ -/* $NetBSD: make.c,v 1.9 1996/08/30 23:21:10 christos 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. * @@ -40,9 +40,9 @@ #ifndef lint #if 0 -static char sccsid[] = "@(#)make.c 5.3 (Berkeley) 6/1/90"; +static char sccsid[] = "@(#)make.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$NetBSD: make.c,v 1.9 1996/08/30 23:21:10 christos Exp $"; +static char rcsid[] = "$NetBSD: make.c,v 1.10 1996/11/06 17:59:15 christos Exp $"; #endif #endif /* not lint */ @@ -102,10 +102,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 @@ -142,7 +142,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 @@ -193,7 +193,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..."); } @@ -340,7 +340,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); @@ -353,7 +353,7 @@ Make_HandleUse (cgn, pgn) } Lst_Close (cgn->children); } - + pgn->type |= cgn->type & ~(OP_OPMASK|OP_USE|OP_TRANSFORM); /* @@ -382,7 +382,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 @@ -481,7 +481,7 @@ Make_Update (cgn) } #endif } - + if (Lst_Open (cgn->parents) == SUCCESS) { while ((ln = Lst_Next (cgn->parents)) != NILLNODE) { pgn = (GNode *)Lst_Datum (ln); @@ -526,7 +526,7 @@ Make_Update (cgn) (void)Lst_EnQueue(toBeMade, (ClientData)succ); } } - + /* * Set the .PREFIX and .IMPSRC variables for all the implied parents * of this node. @@ -683,7 +683,7 @@ static Boolean MakeStartJobs () { register GNode *gn; - + while (!Job_Full() && !Lst_IsEmpty (toBeMade)) { gn = (GNode *) Lst_DeQueue (toBeMade); if (DEBUG(MAKE)) { @@ -716,7 +716,7 @@ MakeStartJobs () continue; } } - + numNodes--; if (Make_OODate (gn)) { if (DEBUG(MAKE)) { @@ -741,7 +741,7 @@ MakeStartJobs () */ Make_DoAllVar (gn); } - + Make_Update (gn); } } @@ -836,22 +836,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... @@ -866,7 +866,7 @@ Make_Run (targs) } } } - + Lst_Destroy (examine, NOFREE); if (queryFlag) { @@ -882,7 +882,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(); } @@ -911,6 +911,6 @@ Make_Run (targs) */ errors = ((errors == 0) && (numNodes != 0)); Lst_ForEach(targs, MakePrintStatus, (ClientData) &errors); - + return (TRUE); } |
