version 1.58, 2007/09/17 08:36:57 |
version 1.59, 2007/09/17 09:28:36 |
|
|
|
|
static volatile sig_atomic_t interrupted; |
static volatile sig_atomic_t interrupted; |
|
|
static void |
static void |
CompatInterrupt(int signo) |
CompatInterrupt(int signo) |
{ |
{ |
if (interrupted != SIGINT) |
if (interrupted != SIGINT) |
|
|
} |
} |
|
|
if (Lst_Member(&gn->iParents, pgn) != NULL) { |
if (Lst_Member(&gn->iParents, pgn) != NULL) { |
Varq_Set(IMPSRC_INDEX, Varq_Value(TARGET_INDEX, gn), |
Varq_Set(IMPSRC_INDEX, Varq_Value(TARGET_INDEX, gn), |
pgn); |
pgn); |
} |
} |
|
|
|
|
/* Our commands are ok, but we still have to worry |
/* Our commands are ok, but we still have to worry |
* about the -t flag... */ |
* about the -t flag... */ |
if (!touchFlag) |
if (!touchFlag) |
Lst_ForEachNodeWhile(&gn->commands, |
Lst_ForEachNodeWhile(&gn->commands, |
CompatRunCommand, gn); |
CompatRunCommand, gn); |
else |
else |
Job_Touch(gn, gn->type & OP_SILENT); |
Job_Touch(gn, gn->type & OP_SILENT); |
|
|
if (is_strictly_before(gn->mtime, gn->cmtime)) |
if (is_strictly_before(gn->mtime, gn->cmtime)) |
gn->mtime = gn->cmtime; |
gn->mtime = gn->cmtime; |
if (DEBUG(MAKE)) |
if (DEBUG(MAKE)) |
printf("update time: %s\n", |
printf("update time: %s\n", |
time_to_string(gn->mtime)); |
time_to_string(gn->mtime)); |
if (!(gn->type & OP_EXEC)) { |
if (!(gn->type & OP_EXEC)) { |
pgn->childMade = true; |
pgn->childMade = true; |
|
|
(unsigned long)gn->lineno, |
(unsigned long)gn->lineno, |
gn->fname); |
gn->fname); |
else |
else |
printf("\n\nStop in %s.\n", |
printf("\n\nStop in %s.\n", |
Var_Value(".CURDIR")); |
Var_Value(".CURDIR")); |
exit(1); |
exit(1); |
} |
} |
|
|
pgn->make = false; |
pgn->make = false; |
else { |
else { |
if (Lst_Member(&gn->iParents, pgn) != NULL) { |
if (Lst_Member(&gn->iParents, pgn) != NULL) { |
Varq_Set(IMPSRC_INDEX, Varq_Value(TARGET_INDEX, gn), |
Varq_Set(IMPSRC_INDEX, Varq_Value(TARGET_INDEX, gn), |
pgn); |
pgn); |
} |
} |
switch (gn->made) { |
switch (gn->made) { |
|
|
if (!queryFlag) { |
if (!queryFlag) { |
gn = Targ_FindNode(".BEGIN", TARG_NOCREATE); |
gn = Targ_FindNode(".BEGIN", TARG_NOCREATE); |
if (gn != NULL) { |
if (gn != NULL) { |
Lst_ForEachNodeWhile(&gn->commands, CompatRunCommand, |
Lst_ForEachNodeWhile(&gn->commands, CompatRunCommand, |
gn); |
gn); |
if (gn->made == ERROR) { |
if (gn->made == ERROR) { |
printf("\n\nStop.\n"); |
printf("\n\nStop.\n"); |
|
|
* 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 created |
* ERROR An error occurred while gn was being created |
* ABORTED gn was not remade because one of its |
* ABORTED gn was not remade because one of its |
* inferiors could not be made due to errors. |
* inferiors could not be made due to errors. |
*/ |
*/ |
errors = 0; |
errors = 0; |
|
|
if (gn->made == UPTODATE) |
if (gn->made == 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->made == ABORTED) { |
printf("`%s' not remade because of errors.\n", |
printf("`%s' not remade because of errors.\n", |
gn->name); |
gn->name); |
errors++; |
errors++; |
} |
} |
|
|
|
|
/* If the user has defined a .END target, run its commands. */ |
/* If the user has defined a .END target, run its commands. */ |
if (errors == 0) |
if (errors == 0) |
Lst_ForEachNodeWhile(&ENDNode->commands, CompatRunCommand, |
Lst_ForEachNodeWhile(&ENDNode->commands, CompatRunCommand, |
ENDNode); |
ENDNode); |
} |
} |