version 1.39, 2000/04/17 23:54:47 |
version 1.40, 2000/06/10 01:26:37 |
|
|
* operators are incompatible, a major error is taken. |
* operators are incompatible, a major error is taken. |
* |
* |
* Results: |
* Results: |
* Always 0 |
* 0 if a problem, 1 if ok. |
* |
* |
* Side Effects: |
* Side Effects: |
* The type field of the node is altered to reflect any new bits in |
* The type field of the node is altered to reflect any new bits in |
|
|
* the operator actually has some dependency information in it, complain. |
* the operator actually has some dependency information in it, complain. |
*/ |
*/ |
if (((op & OP_OPMASK) != (gn->type & OP_OPMASK)) && |
if (((op & OP_OPMASK) != (gn->type & OP_OPMASK)) && |
!OP_NOP(gn->type) && !OP_NOP(op)) |
!OP_NOP(gn->type) && !OP_NOP(op)) { |
{ |
Parse_Error(PARSE_FATAL, "Inconsistent operator for %s", gn->name); |
Parse_Error (PARSE_FATAL, "Inconsistent operator for %s", gn->name); |
return 0; |
return (1); |
|
} |
} |
|
|
if ((op == OP_DOUBLEDEP) && ((gn->type & OP_OPMASK) == OP_DOUBLEDEP)) { |
if ((op == OP_DOUBLEDEP) && ((gn->type & OP_OPMASK) == OP_DOUBLEDEP)) { |
|
|
*/ |
*/ |
gn->type |= op; |
gn->type |= op; |
|
|
return (0); |
return 1; |
} |
} |
|
|
/*- |
/*- |
|
|
* .WAIT directive. |
* .WAIT directive. |
* |
* |
* Results: |
* Results: |
* Returns 1 if the two targets need to be ordered, 0 otherwise. |
* Returns 0 if the two targets need to be ordered, 1 otherwise. |
* If it returns 1, the search can stop |
* If it returns 0, the search can stop |
* |
* |
* Side Effects: |
* Side Effects: |
* A dependency can be added between the two nodes. |
* A dependency can be added between the two nodes. |
|
|
*/ |
*/ |
Lst_AtEnd(p->successors, s); |
Lst_AtEnd(p->successors, s); |
Lst_AtEnd(s->preds, p); |
Lst_AtEnd(s->preds, p); |
return 0; |
return 1; |
} |
} |
else |
else |
return 1; |
return 0; |
} |
} |
|
|
|
|
|
|
if (keywd != -1) { |
if (keywd != -1) { |
int op = parseKeywords[keywd].op; |
int op = parseKeywords[keywd].op; |
if (op != 0) { |
if (op != 0) { |
Lst_ForEach (targets, ParseDoOp, &op); |
Lst_Find(targets, ParseDoOp, &op); |
return; |
return; |
} |
} |
if (parseKeywords[keywd].spec == Wait) { |
if (parseKeywords[keywd].spec == Wait) { |
|
|
|
|
gn->order = waiting; |
gn->order = waiting; |
Lst_AtEnd(allsrc, gn); |
Lst_AtEnd(allsrc, gn); |
if (waiting) { |
if (waiting) |
Lst_ForEach(allsrc, ParseAddDep, gn); |
Lst_Find(allsrc, ParseAddDep, gn); |
} |
|
} |
} |
|
|
/*- |
/*- |
|
|
* yet. |
* yet. |
* |
* |
* Results: |
* Results: |
* 0 if main not found yet, 1 if it is. |
* 1 if main not found yet, 0 if it is. |
* |
* |
* Side Effects: |
* Side Effects: |
* mainNode is changed and Targ_SetMain is called. |
* mainNode is changed and Targ_SetMain is called. |
|
|
if ((gn->type & OP_NOTARGET) == 0) { |
if ((gn->type & OP_NOTARGET) == 0) { |
mainNode = gn; |
mainNode = gn; |
Targ_SetMain(gn); |
Targ_SetMain(gn); |
return (dummy ? 1 : 1); |
|
} else { |
|
return (dummy ? 0 : 0); |
return (dummy ? 0 : 0); |
|
} else { |
|
return (dummy ? 1 : 1); |
} |
} |
} |
} |
|
|
|
|
|
|
cp++; /* Advance beyond operator */ |
cp++; /* Advance beyond operator */ |
|
|
Lst_ForEach (targets, ParseDoOp, &op); |
Lst_Find(targets, ParseDoOp, &op); |
|
|
/* |
/* |
* Get to the first source |
* Get to the first source |
|
|
* the first dependency line that is actually a real target |
* the first dependency line that is actually a real target |
* (i.e. isn't a .USE or .EXEC rule) to be made. |
* (i.e. isn't a .USE or .EXEC rule) to be made. |
*/ |
*/ |
Lst_ForEach(targets, ParseFindMain, NULL); |
Lst_Find(targets, ParseFindMain, NULL); |
} |
} |
|
|
/* |
/* |