Lines Matching refs:gn

205     GNode	  **gn;
383 * gn current node we're looking at
394 SuffGNHasNameP(const void *gn, const void *name)
396 return (strcmp(name, ((const GNode *)gn)->name));
687 GNode *gn; /* GNode of transformation rule */
698 gn = Targ_NewGN(line);
699 (void)Lst_AtEnd(transforms, gn);
707 gn = (GNode *)Lst_Datum(ln);
708 Lst_Destroy(gn->commands, NULL);
709 Lst_Destroy(gn->children, NULL);
710 gn->commands = Lst_Init(FALSE);
711 gn->children = Lst_Init(FALSE);
714 gn->type = OP_TRANSFORM;
728 return (gn);
755 GNode *gn = (GNode *)gnp;
757 if ((gn->type & OP_DOUBLEDEP) && !Lst_IsEmpty (gn->cohorts))
758 gn = (GNode *)Lst_Datum(Lst_Last(gn->cohorts));
759 if ((gn->type & OP_TRANSFORM) && Lst_IsEmpty(gn->commands) &&
760 Lst_IsEmpty(gn->children))
768 if (SuffParseTransform(gn->name, &s, &t)) {
796 } else if ((gn->type & OP_TRANSFORM) && DEBUG(SUFF)) {
797 fprintf(debug_file, "transformation %s complete\n", gn->name);
907 if (*gs->gn == NULL && gs->r && (target->type & OP_NOTARGET) == 0) {
908 *gs->gn = target;
921 if (*gs->gn == target) {
923 *gs->gn = NULL;
962 Suff_AddSuffix(char *str, GNode **gn)
989 gs.gn = gn;
1522 GNode *gn; /* New source 8) */
1581 gn = Targ_FindNode(start, TARG_CREATE);
1582 (void)Lst_AtEnd(members, gn);
1619 gn = Targ_FindNode(start, TARG_CREATE);
1620 (void)Lst_AtEnd(members, gn);
1633 gn = (GNode *)Lst_DeQueue(members);
1636 fprintf(debug_file, "%s...", gn->name);
1638 /* Add gn to the parents child list before the original child */
1639 (void)Lst_InsertBefore(pgn->children, cln, gn);
1640 (void)Lst_AtEnd(gn->parents, pgn);
1669 GNode *gn; /* New source 8) */
1691 gn = Targ_FindNode(cp, TARG_CREATE);
1693 /* Add gn to the parents child list before the original child */
1694 (void)Lst_InsertBefore(pgn->children, cln, gn);
1695 (void)Lst_AtEnd(gn->parents, pgn);
1726 * gn Node being examined
1738 Suff_FindPath(GNode* gn)
1740 Suff *suff = gn->suffix;
1745 sd.len = strlen(gn->name);
1746 sd.ename = gn->name + sd.len;
1750 fprintf(debug_file, "Wildcard expanding \"%s\"...", gn->name);
1799 GNode *gn; /* Node for same */
1824 gn = (GNode *)Lst_Datum(ln);
1838 (void)Make_HandleUse(gn, tGn);
1864 * gn Node for which to locate dependencies
1875 SuffFindArchiveDeps(GNode *gn, Lst slst)
1893 eoarch = strchr(gn->name, '(');
1914 (void)Lst_AtEnd(gn->children, mem);
1915 (void)Lst_AtEnd(mem->parents, gn);
1916 gn->unmade += 1;
1923 Var_Set(copy[i], Var_Value(copy[i], mem, &p1), gn, 0);
1944 Var_Set(MEMBER, name, gn, 0);
1945 Var_Set(ARCHIVE, gn->name, gn, 0);
1960 sd.len = eoarch - gn->name;
1968 if (!SuffApplyTransform(gn, mem, (Suff *)Lst_Datum(ln), ms) &&
1984 * Pretend gn appeared to the left of a dependency operator so
1988 if (OP_NOP(gn->type)) {
1989 gn->type |= OP_DEPENDS;
2005 * gn Node for which to find sources
2016 SuffFindNormalDeps(GNode *gn, Lst slst)
2032 sd.len = strlen(gn->name);
2033 sd.ename = eoname = gn->name + sd.len;
2035 sopref = gn->name;
2065 if (!(gn->type & OP_PHONY)) {
2080 targ->file = bmake_strdup(gn->name);
2083 targ->node = gn;
2122 fprintf(debug_file, "\tNo known suffix on %s. Using .NULL suffix\n", gn->name);
2126 targ->file = bmake_strdup(gn->name);
2129 targ->node = gn;
2143 if (Lst_IsEmpty(gn->commands))
2182 Var_Set(TARGET, gn->path ? gn->path : gn->name, gn, 0);
2184 pref = (targ != NULL) ? targ->pref : gn->name;
2185 Var_Set(PREFIX, pref, gn, 0);
2191 for (ln = Lst_First(gn->children); ln != NULL; ln = nln) {
2193 SuffExpandChildren(ln, gn);
2198 fprintf(debug_file, "\tNo valid suffix on %s\n", gn->name);
2208 if ((gn->type & (OP_PHONY|OP_NOPATH)) == 0) {
2209 free(gn->path);
2210 gn->path = Dir_FindFile(gn->name,
2213 if (gn->path != NULL) {
2215 Var_Set(TARGET, gn->path, gn, 0);
2222 int savep = strlen(gn->path) - targ->suff->nameLen;
2225 if (gn->suffix)
2226 gn->suffix->refCount--;
2227 gn->suffix = targ->suff;
2228 gn->suffix->refCount++;
2230 savec = gn->path[savep];
2231 gn->path[savep] = '\0';
2233 if ((ptr = strrchr(gn->path, '/')) != NULL)
2236 ptr = gn->path;
2238 Var_Set(PREFIX, ptr, gn, 0);
2240 gn->path[savep] = savec;
2246 if (gn->suffix)
2247 gn->suffix->refCount--;
2248 gn->suffix = NULL;
2250 if ((ptr = strrchr(gn->path, '/')) != NULL)
2253 ptr = gn->path;
2255 Var_Set(PREFIX, ptr, gn, 0);
2268 gn->type |= OP_LIB;
2274 if (!Lst_IsEmpty(gn->children)) {
2307 * node, gn, to be replaced by the commands of the final
2308 * transformation rule. Also, the unmade field of gn is incremented.
2330 if (targ->node != gn) {
2333 * between bottom and gn (no point in questing around the
2348 if (gn->suffix)
2349 gn->suffix->refCount--;
2350 gn->suffix = src->suff;
2351 gn->suffix->refCount++;
2374 * gn
2399 Suff_FindDeps(GNode *gn)
2402 SuffFindDeps(gn, srclist);
2410 * gn node we're dealing with
2414 SuffFindDeps(GNode *gn, Lst slst)
2416 if (gn->type & OP_DEPS_FOUND) {
2422 gn->type |= OP_DEPS_FOUND;
2427 Var_Set(TARGET, gn->path ? gn->path : gn->name, gn, 0);
2428 Var_Set(PREFIX, gn->name, gn, 0);
2431 fprintf(debug_file, "SuffFindDeps (%s)\n", gn->name);
2434 if (gn->type & OP_ARCHV) {
2435 SuffFindArchiveDeps(gn, slst);
2436 } else if (gn->type & OP_LIB) {
2449 if (gn->suffix)
2450 gn->suffix->refCount--;
2452 gn->suffix = s = (Suff *)Lst_Datum(ln);
2453 gn->suffix->refCount++;
2454 Arch_FindLib(gn, s->searchPath);
2456 gn->suffix = NULL;
2457 Var_Set(TARGET, gn->name, gn, 0);
2464 Var_Set(PREFIX, "", gn, 0);
2466 SuffFindNormalDeps(gn, slst);