version 1.27, 2009/08/16 09:49:22 |
version 1.28, 2010/04/25 13:59:53 |
|
|
* No commands. Look for .DEFAULT rule from which we might infer |
* No commands. Look for .DEFAULT rule from which we might infer |
* commands |
* commands |
*/ |
*/ |
if ((gn->type & OP_NODEFAULT) == 0 && |
if ((gn->type & OP_NODEFAULT) == 0 && |
(DEFAULT->type & OP_DUMMY) == 0 && |
(DEFAULT->type & OP_DUMMY) == 0 && |
!Lst_IsEmpty(&DEFAULT->commands)) { |
!Lst_IsEmpty(&DEFAULT->commands)) { |
/* |
/* |
|
|
* The node wasn't the target of an operator we have no |
* The node wasn't the target of an operator we have no |
* .DEFAULT rule to go on and the target doesn't |
* .DEFAULT rule to go on and the target doesn't |
* already exist. There's nothing more we can do for |
* already exist. There's nothing more we can do for |
* this branch. |
* this branch. |
*/ |
*/ |
return false; |
return false; |
} |
} |
|
|
else { |
else { |
if (oodate_count == 2) { |
if (oodate_count == 2) { |
Buf_Init(&oodate, 0); |
Buf_Init(&oodate, 0); |
Buf_AddString(&oodate, |
Buf_AddString(&oodate, |
Var(OODATE_INDEX, gn)); |
Var(OODATE_INDEX, gn)); |
} |
} |
Buf_AddSpace(&oodate); |
Buf_AddSpace(&oodate); |
|
|
else { |
else { |
if (allsrc_count == 2) { |
if (allsrc_count == 2) { |
Buf_Init(&allsrc, 0); |
Buf_Init(&allsrc, 0); |
Buf_AddString(&allsrc, |
Buf_AddString(&allsrc, |
Var(ALLSRC_INDEX, gn)); |
Var(ALLSRC_INDEX, gn)); |
} |
} |
Buf_AddSpace(&allsrc); |
Buf_AddSpace(&allsrc); |
|
|
|
|
if (gn->impliedsrc) |
if (gn->impliedsrc) |
Var(IMPSRC_INDEX, gn) = Var(TARGET_INDEX, gn->impliedsrc); |
Var(IMPSRC_INDEX, gn) = Var(TARGET_INDEX, gn->impliedsrc); |
|
|
if (gn->type & OP_JOIN) |
if (gn->type & OP_JOIN) |
Var(TARGET_INDEX, gn) = Var(ALLSRC_INDEX, gn); |
Var(TARGET_INDEX, gn) = Var(ALLSRC_INDEX, gn); |
} |
} |
|
|
if (*cmd == '\0') { |
if (*cmd == '\0') { |
Error("%s expands to empty string", cmd); |
Error("%s expands to empty string", cmd); |
return 1; |
return 1; |
} |
} |
|
|
for (;; cmd++) { |
for (;; cmd++) { |
if (*cmd == '@') |
if (*cmd == '@') |
|
|
return 0; |
return 0; |
} |
} |
|
|
static void |
static void |
handle_compat_interrupts(GNode *gn) |
handle_compat_interrupts(GNode *gn) |
{ |
{ |
if (!Targ_Precious(gn)) { |
if (!Targ_Precious(gn)) { |
|
|
gn->built_status = MADE; |
gn->built_status = MADE; |
/* XXX don't bother freeing cmd, we're dead anyways ! */ |
/* XXX don't bother freeing cmd, we're dead anyways ! */ |
while ((cmd = Lst_DeQueue(&gn->expanded)) != NULL) { |
while ((cmd = Lst_DeQueue(&gn->expanded)) != NULL) { |
if (setup_and_run_command(cmd, gn, |
if (setup_and_run_command(cmd, gn, |
Lst_IsEmpty(&gn->expanded)) == 0) |
Lst_IsEmpty(&gn->expanded)) == 0) |
break; |
break; |
} |
} |
|
|
case ERROR: |
case ERROR: |
exit(1); |
exit(1); |
default: |
default: |
fprintf(stderr, "Could not run gnode, returned %d\n", |
fprintf(stderr, "Could not run gnode, returned %d\n", |
gn->built_status); |
gn->built_status); |
exit(1); |
exit(1); |
} |
} |