version 1.66, 2007/11/06 21:12:23 |
version 1.67, 2007/11/10 12:51:40 |
|
|
|
|
if (pgn->type & OP_MADE) { |
if (pgn->type & OP_MADE) { |
(void)Dir_MTime(gn); |
(void)Dir_MTime(gn); |
gn->made = UPTODATE; |
gn->built_status = UPTODATE; |
} |
} |
|
|
if (gn->type & OP_USE) { |
if (gn->type & OP_USE) { |
Make_HandleUse(gn, pgn); |
Make_HandleUse(gn, pgn); |
} else if (gn->made == UNMADE) { |
} else if (gn->built_status == UNMADE) { |
/* First mark ourselves to be made, then apply whatever |
/* First mark ourselves to be made, then apply whatever |
* transformations the suffix module thinks are necessary. |
* transformations the suffix module thinks are necessary. |
* Once that's done, we can descend and make all our children. |
* Once that's done, we can descend and make all our children. |
* If any of them has an error but the -k flag was given, |
* If any of them has an error but the -k flag was given, |
* our 'make' field will be set false again. This is our |
* our 'must_make' field will be set false again. This is our |
* signal to not attempt to do anything but abort our |
* signal to not attempt to do anything but abort our |
* parent as well. */ |
* parent as well. */ |
gn->make = true; |
gn->must_make = true; |
gn->made = BEINGMADE; |
gn->built_status = BEINGMADE; |
Suff_FindDeps(gn); |
Suff_FindDeps(gn); |
Lst_ForEach(&gn->children, CompatMake, gn); |
Lst_ForEach(&gn->children, CompatMake, gn); |
if (!gn->make) { |
if (!gn->must_make) { |
gn->made = ABORTED; |
gn->built_status = ABORTED; |
pgn->make = false; |
pgn->must_make = false; |
return; |
return; |
} |
} |
|
|
|
|
if (DEBUG(MAKE)) |
if (DEBUG(MAKE)) |
printf("Examining %s...", gn->name); |
printf("Examining %s...", gn->name); |
if (!Make_OODate(gn)) { |
if (!Make_OODate(gn)) { |
gn->made = UPTODATE; |
gn->built_status = UPTODATE; |
if (DEBUG(MAKE)) |
if (DEBUG(MAKE)) |
printf("up-to-date.\n"); |
printf("up-to-date.\n"); |
return; |
return; |
|
|
else |
else |
Job_Touch(gn); |
Job_Touch(gn); |
} else |
} else |
gn->made = ERROR; |
gn->built_status = ERROR; |
|
|
if (gn->made != ERROR) { |
if (gn->built_status != ERROR) { |
/* If the node was made successfully, mark it so, |
/* If the node was made successfully, mark it so, |
* update its modification time and timestamp all |
* update its modification time and timestamp all |
* its parents. |
* its parents. |
* This is to keep its state from affecting that of |
* This is to keep its state from affecting that of |
* its parent. */ |
* its parent. */ |
gn->made = MADE; |
gn->built_status = MADE; |
/* This is what Make does and it's actually a good |
/* This is what Make does and it's actually a good |
* thing, as it allows rules like |
* thing, as it allows rules like |
* |
* |
|
|
Make_TimeStamp(pgn, gn); |
Make_TimeStamp(pgn, gn); |
} |
} |
} else if (keepgoing) |
} else if (keepgoing) |
pgn->make = false; |
pgn->must_make = false; |
else { |
else { |
|
|
if (gn->lineno) |
if (gn->lineno) |
|
|
Var_Value(".CURDIR")); |
Var_Value(".CURDIR")); |
exit(1); |
exit(1); |
} |
} |
} else if (gn->made == ERROR) |
} else if (gn->built_status == ERROR) |
/* Already had an error when making this beastie. Tell the parent |
/* Already had an error when making this beastie. Tell the |
* to abort. */ |
* parent to abort. */ |
pgn->make = false; |
pgn->must_make = false; |
else { |
else { |
switch (gn->made) { |
switch (gn->built_status) { |
case BEINGMADE: |
case BEINGMADE: |
Error("Graph cycles through %s\n", gn->name); |
Error("Graph cycles through %s\n", gn->name); |
gn->made = ERROR; |
gn->built_status = ERROR; |
pgn->make = false; |
pgn->must_make = false; |
break; |
break; |
case MADE: |
case MADE: |
if ((gn->type & OP_EXEC) == 0) { |
if ((gn->type & OP_EXEC) == 0) { |
|
|
} |
} |
|
|
/* For each entry in the list of targets to create, call CompatMake on |
/* For each entry in the list of targets to create, call CompatMake on |
* it to create the thing. CompatMake will leave the 'made' field of gn |
* it to create the thing. CompatMake will leave the 'built_status' |
* in one of several states: |
* field of gn in one of several states: |
* UPTODATE gn was already up-to-date |
* UPTODATE gn was already up-to-date |
* MADE gn was recreated successfully |
* MADE gn was recreated successfully |
* ERROR An error occurred while gn was being |
* ERROR An error occurred while gn was being |
|
|
while ((gn = (GNode *)Lst_DeQueue(targs)) != NULL) { |
while ((gn = (GNode *)Lst_DeQueue(targs)) != NULL) { |
CompatMake(gn, gn); |
CompatMake(gn, gn); |
|
|
if (gn->made == UPTODATE) |
if (gn->built_status == UPTODATE) |
printf("`%s' is up to date.\n", gn->name); |
printf("`%s' is up to date.\n", gn->name); |
else if (gn->made == ABORTED) { |
else if (gn->built_status == ABORTED) { |
printf("`%s' not remade because of errors.\n", |
printf("`%s' not remade because of errors.\n", |
gn->name); |
gn->name); |
errors++; |
errors++; |