version 1.75, 2007/11/06 21:15:19 |
version 1.76, 2007/11/17 16:39:45 |
|
|
} |
} |
|
|
/* Copy variables from member node to this one. */ |
/* Copy variables from member node to this one. */ |
Varq_Set(TARGET_INDEX, Varq_Value(TARGET_INDEX, mem), gn); |
Var(TARGET_INDEX, gn) = Var(TARGET_INDEX, mem); |
Varq_Set(PREFIX_INDEX, Varq_Value(PREFIX_INDEX, mem), gn); |
Var(PREFIX_INDEX, gn) = Var(PREFIX_INDEX, mem); |
|
|
ms = mem->suffix; |
ms = mem->suffix; |
if (ms == NULL) { |
if (ms == NULL) { |
|
|
|
|
|
|
/* Set the other two local variables required for this target. */ |
/* Set the other two local variables required for this target. */ |
Varq_Set(MEMBER_INDEX, mem->name, gn); |
Var(MEMBER_INDEX, gn) = mem->name; |
Varq_Set(ARCHIVE_INDEX, gn->name, gn); |
Var(ARCHIVE_INDEX, gn) = gn->name; |
|
|
if (ms != NULL) { |
if (ms != NULL) { |
/* |
/* |
|
|
* since it's only set to the path if the thing is only a source and |
* since it's only set to the path if the thing is only a source and |
* if it's only a source, it doesn't matter what we put here as far |
* if it's only a source, it doesn't matter what we put here as far |
* as expanding sources is concerned, since it has none... */ |
* as expanding sources is concerned, since it has none... */ |
Varq_Set(TARGET_INDEX, gn->name, gn); |
Var(TARGET_INDEX, gn) = gn->name; |
|
|
pref = targ != NULL ? targ->pref : gn->name; |
pref = targ != NULL ? estrdup(targ->pref) : gn->name; |
Varq_Set(PREFIX_INDEX, pref, gn); |
Var(PREFIX_INDEX, gn) = pref; |
|
|
/* Now we've got the important local variables set, expand any sources |
/* Now we've got the important local variables set, expand any sources |
* that still contain variables or wildcards in their names. */ |
* that still contain variables or wildcards in their names. */ |
|
|
&targ->suff->searchPath)); |
&targ->suff->searchPath)); |
if (gn->path != NULL) { |
if (gn->path != NULL) { |
char *ptr; |
char *ptr; |
Varq_Set(TARGET_INDEX, gn->path, gn); |
Var(TARGET_INDEX, gn) = estrdup(gn->path); |
|
|
if (targ != NULL) { |
if (targ != NULL) { |
/* Suffix known for the thing -- trim |
/* Suffix known for the thing -- trim |
|
|
else |
else |
ptr = gn->path; |
ptr = gn->path; |
|
|
Varq_Set(PREFIX_INDEX, ptr, gn); |
Var(PREFIX_INDEX, gn) = estrdup(ptr); |
|
|
gn->path[savep] = savec; |
gn->path[savep] = savec; |
} else { |
} else { |
|
|
else |
else |
ptr = gn->path; |
ptr = gn->path; |
|
|
Varq_Set(PREFIX_INDEX, ptr, gn); |
Var(PREFIX_INDEX, gn) = estrdup(ptr); |
} |
} |
} |
} |
} else { |
} else { |
|
|
* is set the standard and System V variables. */ |
* is set the standard and System V variables. */ |
targ->node->type |= OP_DEPS_FOUND; |
targ->node->type |= OP_DEPS_FOUND; |
|
|
Varq_Set(PREFIX_INDEX, targ->pref, targ->node); |
Var(PREFIX_INDEX, targ->node) = estrdup(targ->pref); |
|
|
Varq_Set(TARGET_INDEX, targ->node->name, targ->node); |
Var(TARGET_INDEX, targ->node) = targ->node->name; |
} |
} |
} |
} |
|
|
|
|
Arch_FindLib(gn, &s->searchPath); |
Arch_FindLib(gn, &s->searchPath); |
} else { |
} else { |
gn->suffix = NULL; |
gn->suffix = NULL; |
Varq_Set(TARGET_INDEX, gn->name, gn); |
Var(TARGET_INDEX, gn) = gn->name; |
} |
} |
/* |
/* |
* Because a library (-lfoo) target doesn't follow the standard |
* Because a library (-lfoo) target doesn't follow the standard |
* filesystem conventions, we don't set the regular variables |
* filesystem conventions, we don't set the regular variables |
* for the thing. .PREFIX is simply made empty... |
* for the thing. .PREFIX is simply made empty... |
*/ |
*/ |
Varq_Set(PREFIX_INDEX, "", gn); |
Var(PREFIX_INDEX, gn) = ""; |
} else |
} else |
SuffFindNormalDeps(gn, slst); |
SuffFindNormalDeps(gn, slst); |
} |
} |