version 1.57, 2019/12/21 15:28:16 |
version 1.58, 2019/12/21 15:29:25 |
|
|
GNode *gn; /* A child of the .USE node */ |
GNode *gn; /* A child of the .USE node */ |
LstNode ln; /* An element in the children list */ |
LstNode ln; /* An element in the children list */ |
|
|
|
|
assert(cgn->type & (OP_USE|OP_TRANSFORM)); |
assert(cgn->type & (OP_USE|OP_TRANSFORM)); |
|
|
if (pgn == NULL) |
if (pgn == NULL) |
|
|
|
|
if (Lst_AddNew(&pgn->children, gn)) { |
if (Lst_AddNew(&pgn->children, gn)) { |
Lst_AtEnd(&gn->parents, pgn); |
Lst_AtEnd(&gn->parents, pgn); |
pgn->unmade++; |
pgn->children_left++; |
} |
} |
} |
} |
|
|
|
|
pgn->type |= cgn->type & ~(OP_OPMASK|OP_USE|OP_TRANSFORM|OP_DOUBLE); |
pgn->type |= cgn->type & ~(OP_OPMASK|OP_USE|OP_TRANSFORM|OP_DOUBLE); |
|
|
/* |
/* |
* This child node is now "made", so we decrement the count of |
* This child node is now built, so we decrement the count of |
* unmade children in the parent... We also remove the child |
* not yet built children in the parent... We also remove the child |
* from the parent's list to accurately reflect the number of |
* from the parent's list to accurately reflect the number of |
* decent children the parent has. This is used by Make_Run to |
* remaining children the parent has. This is used by Make_Run to |
* decide whether to queue the parent or examine its children... |
* decide whether to queue the parent or examine its children... |
*/ |
*/ |
if (cgn->type & OP_USE) |
if (cgn->type & OP_USE) |
pgn->unmade--; |
pgn->children_left--; |
} |
} |
|
|
void |
void |
|
|
} |
} |
|
|
/* |
/* |
* A target is remade in one of the following circumstances: |
* A target is rebuilt in one of the following circumstances: |
* - its modification time is smaller than that of its youngest child |
* - its modification time is smaller than that of its youngest child |
* and it would actually be run (has commands or type OP_NOP) |
* and it would actually be run (has commands or type OP_NOP) |
* - it's the object of a force operator |
* - it's the object of a force operator |
|
|
*/ |
*/ |
if (DEBUG(MAKE)) |
if (DEBUG(MAKE)) |
printf(".JOIN node..."); |
printf(".JOIN node..."); |
oodate = gn->childMade; |
oodate = gn->child_rebuilt; |
} else if (gn->type & (OP_FORCE|OP_EXEC|OP_PHONY)) { |
} else if (gn->type & (OP_FORCE|OP_EXEC|OP_PHONY)) { |
/* |
/* |
* A node which is the object of the force (!) operator or which |
* A node which is the object of the force (!) operator or which |