version 1.34, 1999/12/18 21:56:07 |
version 1.35, 1999/12/18 21:58:07 |
|
|
GNode *pgn = (GNode *) pgnp; |
GNode *pgn = (GNode *) pgnp; |
GNode *cgn = (GNode *) cgnp; |
GNode *cgn = (GNode *) cgnp; |
if (Lst_Member (pgn->children, (ClientData)cgn) == NULL) { |
if (Lst_Member (pgn->children, (ClientData)cgn) == NULL) { |
(void)Lst_AtEnd (pgn->children, (ClientData)cgn); |
Lst_AtEnd(pgn->children, (ClientData)cgn); |
if (specType == Not) { |
if (specType == Not) { |
(void)Lst_AtEnd (cgn->parents, (ClientData)pgn); |
Lst_AtEnd(cgn->parents, (ClientData)pgn); |
} |
} |
pgn->unmade += 1; |
pgn->unmade += 1; |
} |
} |
|
|
*/ |
*/ |
Lst_ForEach(gn->parents, ParseLinkSrc, (ClientData)cohort); |
Lst_ForEach(gn->parents, ParseLinkSrc, (ClientData)cohort); |
cohort->type = OP_DOUBLEDEP|OP_INVISIBLE; |
cohort->type = OP_DOUBLEDEP|OP_INVISIBLE; |
(void)Lst_AtEnd(gn->cohorts, (ClientData)cohort); |
Lst_AtEnd(gn->cohorts, (ClientData)cohort); |
|
|
/* |
/* |
* Replace the node in the targets list with the new copy |
* Replace the node in the targets list with the new copy |
|
|
* but checking is tedious, and the debugging output can show the |
* but checking is tedious, and the debugging output can show the |
* problem |
* problem |
*/ |
*/ |
(void)Lst_AtEnd(p->successors, (ClientData)s); |
Lst_AtEnd(p->successors, (ClientData)s); |
(void)Lst_AtEnd(s->preds, (ClientData)p); |
Lst_AtEnd(s->preds, (ClientData)p); |
return 0; |
return 0; |
} |
} |
else |
else |
|
|
* invoked if the user didn't specify a target on the command |
* invoked if the user didn't specify a target on the command |
* line. This is to allow #ifmake's to succeed, or something... |
* line. This is to allow #ifmake's to succeed, or something... |
*/ |
*/ |
(void) Lst_AtEnd (create, (ClientData)estrdup(src)); |
Lst_AtEnd(create, (ClientData)estrdup(src)); |
/* |
/* |
* Add the name to the .TARGETS variable as well, so the user cna |
* Add the name to the .TARGETS variable as well, so the user cna |
* employ that, if desired. |
* employ that, if desired. |
|
|
*/ |
*/ |
gn = Targ_FindNode(src, TARG_CREATE); |
gn = Targ_FindNode(src, TARG_CREATE); |
if (predecessor != NULL) { |
if (predecessor != NULL) { |
(void)Lst_AtEnd(predecessor->successors, (ClientData)gn); |
Lst_AtEnd(predecessor->successors, (ClientData)gn); |
(void)Lst_AtEnd(gn->preds, (ClientData)predecessor); |
Lst_AtEnd(gn->preds, (ClientData)predecessor); |
} |
} |
/* |
/* |
* The current source now becomes the predecessor for the next one. |
* The current source now becomes the predecessor for the next one. |
|
|
} |
} |
|
|
gn->order = waiting; |
gn->order = waiting; |
(void)Lst_AtEnd(allsrc, (ClientData)gn); |
Lst_AtEnd(allsrc, (ClientData)gn); |
if (waiting) { |
if (waiting) { |
Lst_ForEach(allsrc, ParseAddDep, (ClientData)gn); |
Lst_ForEach(allsrc, ParseAddDep, (ClientData)gn); |
} |
} |
|
|
if (paths == NULL) { |
if (paths == NULL) { |
paths = Lst_Init(); |
paths = Lst_Init(); |
} |
} |
(void)Lst_AtEnd(paths, (ClientData)dirSearchPath); |
Lst_AtEnd(paths, (ClientData)dirSearchPath); |
break; |
break; |
case Main: |
case Main: |
if (!Lst_IsEmpty(create)) { |
if (!Lst_IsEmpty(create)) { |
|
|
case Interrupt: |
case Interrupt: |
gn = Targ_FindNode(line, TARG_CREATE); |
gn = Targ_FindNode(line, TARG_CREATE); |
gn->type |= OP_NOTMAIN; |
gn->type |= OP_NOTMAIN; |
(void)Lst_AtEnd(targets, (ClientData)gn); |
Lst_AtEnd(targets, (ClientData)gn); |
break; |
break; |
case Default: |
case Default: |
gn = Targ_NewGN(".DEFAULT"); |
gn = Targ_NewGN(".DEFAULT"); |
gn->type |= (OP_NOTMAIN|OP_TRANSFORM); |
gn->type |= (OP_NOTMAIN|OP_TRANSFORM); |
(void)Lst_AtEnd(targets, (ClientData)gn); |
Lst_AtEnd(targets, (ClientData)gn); |
DEFAULT = gn; |
DEFAULT = gn; |
break; |
break; |
case NotParallel: |
case NotParallel: |
|
|
if (paths == NULL) { |
if (paths == NULL) { |
paths = Lst_Init(); |
paths = Lst_Init(); |
} |
} |
(void)Lst_AtEnd(paths, (ClientData)path); |
Lst_AtEnd(paths, (ClientData)path); |
} |
} |
} |
} |
} |
} |
|
|
* No wildcards, but we want to avoid code duplication, |
* No wildcards, but we want to avoid code duplication, |
* so create a list with the word on it. |
* so create a list with the word on it. |
*/ |
*/ |
(void)Lst_AtEnd(curTargs, (ClientData)line); |
Lst_AtEnd(curTargs, (ClientData)line); |
} |
} |
|
|
while((targName = (char *)Lst_DeQueue(curTargs)) != NULL) { |
while((targName = (char *)Lst_DeQueue(curTargs)) != NULL) { |
|
|
} |
} |
|
|
if (gn != NULL) |
if (gn != NULL) |
(void)Lst_AtEnd (targets, (ClientData)gn); |
Lst_AtEnd(targets, (ClientData)gn); |
} |
} |
} else if (specType == ExPath && *line != '.' && *line != '\0') { |
} else if (specType == ExPath && *line != '.' && *line != '\0') { |
Parse_Error(PARSE_WARNING, "Extra target (%s) ignored", line); |
Parse_Error(PARSE_WARNING, "Extra target (%s) ignored", line); |
|
|
GNode *gn = (GNode *) gnp; |
GNode *gn = (GNode *) gnp; |
/* if target already supplied, ignore commands */ |
/* if target already supplied, ignore commands */ |
if (!(gn->type & OP_HAS_COMMANDS)) |
if (!(gn->type & OP_HAS_COMMANDS)) |
(void)Lst_AtEnd(gn->commands, cmd); |
Lst_AtEnd(gn->commands, cmd); |
return(0); |
return(0); |
} |
} |
|
|
|
|
oldFile->p = curPTR; |
oldFile->p = curPTR; |
oldFile->lineno = lineno; |
oldFile->lineno = lineno; |
|
|
(void) Lst_AtFront (includes, (ClientData)oldFile); |
Lst_AtFront(includes, (ClientData)oldFile); |
|
|
/* |
/* |
* Once the previous state has been saved, we can get down to reading |
* Once the previous state has been saved, we can get down to reading |
|
|
oldFile->F = curFILE; |
oldFile->F = curFILE; |
oldFile->p = curPTR; |
oldFile->p = curPTR; |
|
|
(void) Lst_AtFront (includes, (ClientData)oldFile); |
Lst_AtFront(includes, (ClientData)oldFile); |
|
|
curFILE = NULL; |
curFILE = NULL; |
curPTR = (PTR *) emalloc (sizeof (PTR)); |
curPTR = (PTR *) emalloc (sizeof (PTR)); |
|
|
oldFile->p = curPTR; |
oldFile->p = curPTR; |
oldFile->lineno = lineno; |
oldFile->lineno = lineno; |
|
|
(void) Lst_AtFront (includes, (ClientData)oldFile); |
Lst_AtFront(includes, (ClientData)oldFile); |
|
|
/* |
/* |
* Once the previous state has been saved, we can get down to reading |
* Once the previous state has been saved, we can get down to reading |
|
|
Punt ("no target to make."); |
Punt ("no target to make."); |
/*NOTREACHED*/ |
/*NOTREACHED*/ |
} else if (mainNode->type & OP_DOUBLEDEP) { |
} else if (mainNode->type & OP_DOUBLEDEP) { |
(void) Lst_AtEnd (listmain, (ClientData)mainNode); |
Lst_AtEnd(listmain, (ClientData)mainNode); |
Lst_Concat(listmain, mainNode->cohorts, LST_CONCNEW); |
Lst_Concat(listmain, mainNode->cohorts, LST_CONCNEW); |
} |
} |
else |
else |
(void) Lst_AtEnd (listmain, (ClientData)mainNode); |
Lst_AtEnd(listmain, (ClientData)mainNode); |
return (listmain); |
return (listmain); |
} |
} |
|
|