version 1.24, 2000/04/17 23:54:47 |
version 1.25, 2000/06/10 01:26:36 |
|
|
if (signo == SIGINT) { |
if (signo == SIGINT) { |
gn = Targ_FindNode(".INTERRUPT", TARG_NOCREATE); |
gn = Targ_FindNode(".INTERRUPT", TARG_NOCREATE); |
if (gn != NULL) { |
if (gn != NULL) { |
Lst_ForEach(gn->commands, CompatRunCommand, gn); |
Lst_Find(gn->commands, CompatRunCommand, gn); |
} |
} |
} |
} |
|
|
|
|
* error, the node's made field is set to ERROR and creation stops. |
* error, the node's made field is set to ERROR and creation stops. |
* |
* |
* Results: |
* Results: |
* 0 if the command succeeded, 1 if an error occurred. |
* 1 if the command succeeded, 0 if an error occurred. |
* |
* |
* Side Effects: |
* Side Effects: |
* The node's 'made' field may be set to ERROR. |
* The node's 'made' field may be set to ERROR. |
|
|
if (*cmdStart == '\0') { |
if (*cmdStart == '\0') { |
free(cmdStart); |
free(cmdStart); |
Error("%s expands to empty string", cmd); |
Error("%s expands to empty string", cmd); |
return(0); |
return 1; |
} else { |
} else { |
cmd = cmdStart; |
cmd = cmdStart; |
} |
} |
|
|
|
|
if ((gn->type & OP_SAVE_CMDS) && (gn != ENDNode)) { |
if ((gn->type & OP_SAVE_CMDS) && (gn != ENDNode)) { |
Lst_AtEnd(ENDNode->commands, cmdStart); |
Lst_AtEnd(ENDNode->commands, cmdStart); |
return(0); |
return 1; |
} else if (strcmp(cmdStart, "...") == 0) { |
} else if (strcmp(cmdStart, "...") == 0) { |
gn->type |= OP_SAVE_CMDS; |
gn->type |= OP_SAVE_CMDS; |
return(0); |
return 1; |
} |
} |
|
|
while ((*cmd == '@') || (*cmd == '-')) { |
while ((*cmd == '@') || (*cmd == '-')) { |
|
|
* If we're not supposed to execute any commands, this is as far as |
* If we're not supposed to execute any commands, this is as far as |
* we go... |
* we go... |
*/ |
*/ |
if (noExecute) { |
if (noExecute) |
return (0); |
return 1; |
} |
|
|
|
if (*cp != '\0') { |
if (*cp != '\0') { |
/* |
/* |
|
|
case -1: /* handled internally */ |
case -1: /* handled internally */ |
free(bp); |
free(bp); |
free(av); |
free(av); |
return 0; |
return 1; |
case 1: |
case 1: |
shargv[1] = (errCheck ? "-ec" : "-c"); |
shargv[1] = (errCheck ? "-ec" : "-c"); |
shargv[2] = cmd; |
shargv[2] = cmd; |
|
|
} |
} |
} |
} |
|
|
return (status); |
return !status; |
} |
} |
|
|
/*- |
/*- |
|
|
*/ |
*/ |
if (!touchFlag) { |
if (!touchFlag) { |
curTarg = gn; |
curTarg = gn; |
Lst_ForEach(gn->commands, CompatRunCommand, gn); |
Lst_Find(gn->commands, CompatRunCommand, gn); |
curTarg = NULL; |
curTarg = NULL; |
} else { |
} else { |
Job_Touch (gn, gn->type & OP_SILENT); |
Job_Touch (gn, gn->type & OP_SILENT); |
|
|
if (!queryFlag) { |
if (!queryFlag) { |
gn = Targ_FindNode(".BEGIN", TARG_NOCREATE); |
gn = Targ_FindNode(".BEGIN", TARG_NOCREATE); |
if (gn != NULL) { |
if (gn != NULL) { |
Lst_ForEach(gn->commands, CompatRunCommand, gn); |
Lst_Find(gn->commands, CompatRunCommand, gn); |
if (gn->made == ERROR) { |
if (gn->made == ERROR) { |
printf("\n\nStop.\n"); |
printf("\n\nStop.\n"); |
exit(1); |
exit(1); |
|
|
* 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_ForEach(ENDNode->commands, CompatRunCommand, gn); |
Lst_Find(ENDNode->commands, CompatRunCommand, gn); |
} |
} |
} |
} |