=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/suff.c,v retrieving revision 1.75 retrieving revision 1.76 diff -c -r1.75 -r1.76 *** src/usr.bin/make/suff.c 2007/11/06 21:15:19 1.75 --- src/usr.bin/make/suff.c 2007/11/17 16:39:45 1.76 *************** *** 1,5 **** /* $OpenPackages$ */ ! /* $OpenBSD: suff.c,v 1.75 2007/11/06 21:15:19 espie Exp $ */ /* $NetBSD: suff.c,v 1.13 1996/11/06 17:59:25 christos Exp $ */ /* --- 1,5 ---- /* $OpenPackages$ */ ! /* $OpenBSD: suff.c,v 1.76 2007/11/17 16:39:45 espie Exp $ */ /* $NetBSD: suff.c,v 1.13 1996/11/06 17:59:25 christos Exp $ */ /* *************** *** 1391,1398 **** } /* Copy variables from member node to this one. */ ! Varq_Set(TARGET_INDEX, Varq_Value(TARGET_INDEX, mem), gn); ! Varq_Set(PREFIX_INDEX, Varq_Value(PREFIX_INDEX, mem), gn); ms = mem->suffix; if (ms == NULL) { --- 1391,1398 ---- } /* Copy variables from member node to this one. */ ! Var(TARGET_INDEX, gn) = Var(TARGET_INDEX, mem); ! Var(PREFIX_INDEX, gn) = Var(PREFIX_INDEX, mem); ms = mem->suffix; if (ms == NULL) { *************** *** 1405,1412 **** /* Set the other two local variables required for this target. */ ! Varq_Set(MEMBER_INDEX, mem->name, gn); ! Varq_Set(ARCHIVE_INDEX, gn->name, gn); if (ms != NULL) { /* --- 1405,1412 ---- /* Set the other two local variables required for this target. */ ! Var(MEMBER_INDEX, gn) = mem->name; ! Var(ARCHIVE_INDEX, gn) = gn->name; if (ms != NULL) { /* *************** *** 1601,1610 **** * 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 * as expanding sources is concerned, since it has none... */ ! Varq_Set(TARGET_INDEX, gn->name, gn); ! pref = targ != NULL ? targ->pref : gn->name; ! Varq_Set(PREFIX_INDEX, pref, gn); /* Now we've got the important local variables set, expand any sources * that still contain variables or wildcards in their names. */ --- 1601,1610 ---- * 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 * as expanding sources is concerned, since it has none... */ ! Var(TARGET_INDEX, gn) = gn->name; ! pref = targ != NULL ? estrdup(targ->pref) : gn->name; ! Var(PREFIX_INDEX, gn) = pref; /* Now we've got the important local variables set, expand any sources * that still contain variables or wildcards in their names. */ *************** *** 1629,1635 **** &targ->suff->searchPath)); if (gn->path != NULL) { char *ptr; ! Varq_Set(TARGET_INDEX, gn->path, gn); if (targ != NULL) { /* Suffix known for the thing -- trim --- 1629,1635 ---- &targ->suff->searchPath)); if (gn->path != NULL) { char *ptr; ! Var(TARGET_INDEX, gn) = estrdup(gn->path); if (targ != NULL) { /* Suffix known for the thing -- trim *************** *** 1650,1656 **** else ptr = gn->path; ! Varq_Set(PREFIX_INDEX, ptr, gn); gn->path[savep] = savec; } else { --- 1650,1656 ---- else ptr = gn->path; ! Var(PREFIX_INDEX, gn) = estrdup(ptr); gn->path[savep] = savec; } else { *************** *** 1664,1670 **** else ptr = gn->path; ! Varq_Set(PREFIX_INDEX, ptr, gn); } } } else { --- 1664,1670 ---- else ptr = gn->path; ! Var(PREFIX_INDEX, gn) = estrdup(ptr); } } } else { *************** *** 1740,1748 **** * is set the standard and System V variables. */ targ->node->type |= OP_DEPS_FOUND; ! Varq_Set(PREFIX_INDEX, targ->pref, targ->node); ! Varq_Set(TARGET_INDEX, targ->node->name, targ->node); } } --- 1740,1748 ---- * is set the standard and System V variables. */ targ->node->type |= OP_DEPS_FOUND; ! Var(PREFIX_INDEX, targ->node) = estrdup(targ->pref); ! Var(TARGET_INDEX, targ->node) = targ->node->name; } } *************** *** 1834,1847 **** Arch_FindLib(gn, &s->searchPath); } else { gn->suffix = NULL; ! Varq_Set(TARGET_INDEX, gn->name, gn); } /* * Because a library (-lfoo) target doesn't follow the standard * filesystem conventions, we don't set the regular variables * for the thing. .PREFIX is simply made empty... */ ! Varq_Set(PREFIX_INDEX, "", gn); } else SuffFindNormalDeps(gn, slst); } --- 1834,1847 ---- Arch_FindLib(gn, &s->searchPath); } else { gn->suffix = NULL; ! Var(TARGET_INDEX, gn) = gn->name; } /* * Because a library (-lfoo) target doesn't follow the standard * filesystem conventions, we don't set the regular variables * for the thing. .PREFIX is simply made empty... */ ! Var(PREFIX_INDEX, gn) = ""; } else SuffFindNormalDeps(gn, slst); }