Lines Matching refs:suffix

86  *	Functions to maintain suffix lists and find implicit dependents
87 * using suffix transformation rules
96 * suffix. It takes the global search path,
100 * .PATH<suffix>: targets. In addition, all
113 * Suff_AddSuffix Add the passed string as another known suffix.
115 * Suff_GetPath Return the search path for the given suffix.
117 * Suff_AddInclude Mark the given suffix as denoting an include
120 * Suff_AddLib Mark the given suffix as denoting a library.
122 * Suff_AddTransform Add another transformation to the suffix
126 * Suff_SetNull Define the suffix to consider the suffix of
130 * a target based on its suffix. Returns the
150 static int sNum = 0; /* Counter for assigning suffix numbers */
153 * Structure describing an individual suffix.
156 char *name; /* The suffix itself */
157 int nameLen; /* Length of the suffix */
158 short flags; /* Type of suffix */
161 #define SUFF_NULL 0x04 /* The empty suffix */
162 Lst searchPath; /* The path along which files of this suffix
164 int sNum; /* The suffix number */
168 Lst ref; /* List of lists this suffix is referenced */
185 Suff *suff; /* The suffix on the file */
210 static Suff *suffNull; /* The NULL suffix for this run */
211 static Suff *emptySuff; /* The empty suffix required for POSIX
212 * single-suffix transformation rules */
274 * See if suff is a suffix of str. sd->ename should point to THE END
278 * s possible suffix
282 * NULL if it ain't, pointer to character in str before suffix if
292 char *p1; /* Pointer into suffix name */
296 return NULL; /* this string is shorter than the suffix */
316 * 0 if the suffix is the one desired, non-zero if not.
332 * Callback procedure for finding a suffix based on its name. Used by
340 * 0 if the suffix is of the given name. non-zero otherwise.
355 * See if the suffix described by s is a prefix of the string. Care
361 * s suffix to compare
416 * Free up all memory associated with the given suffix structure.
422 * the suffix entry is detroyed
439 Punt("Internal error deleting suffix `%s' with refcount = %d", s->name,
455 * Remove the suffix into the list
461 * The reference count for the suffix is decremented and the
462 * suffix is possibly freed
479 * Insert the suffix into the list keeping the list ordered by suffix
484 * s the suffix to insert
490 * The reference count of the suffix is incremented
497 Suff *s2 = NULL; /* the suffix descriptor in this element */
581 LstNode srcLn; /* element in suffix list of trans source*/
583 LstNode targLn; /* element in suffix list of trans target*/
584 char *str2; /* Extra pointer (maybe target suffix) */
585 LstNode singleLn; /* element in suffix list of any suffix
588 * null suffix */
594 * Loop looking first for a suffix that matches the start of the
612 * Not so fast Mr. Smith! There was a suffix that encompassed
614 * to the null suffix (thank you POSIX). We still prefer to
688 Suff *s, /* source suffix */
689 *t; /* target suffix */
809 * given rule is a transformation involving this suffix and another,
810 * existing suffix, the proper relationship is established between
821 * The appropriate links will be made between this suffix and
837 * First see if it is a transformation from this suffix.
862 * Null-terminate the source suffix in order to find it.
867 * Replace the start of the target suffix
945 * Add the suffix in string to the end of the list of known suffixes.
946 * Should we restructure the suffix graph? Make doesn't...
949 * str the name of the suffix to add
955 * A GNode is created for the suffix and a Suff structure is created and
956 * added to the suffixes list unless the suffix was already known.
964 Suff *s; /* new suffix descriptor */
985 * this suffix will make one of our current targets mutate into
986 * a suffix rule. This is ugly, but other makes treat all targets
987 * that start with a . as suffix rules.
994 * Look for any existing transformations from or to this suffix.
1004 * Return the search path for the given suffix, if it's defined.
1007 * The searchPath for the desired suffix or NULL if the suffix isn't
1041 * ".h" suffix, the directories are stuffed into a global variable
1043 * is done for the ".a" suffix, except the variable is called
1097 * Add the given suffix as a type of file which gets included.
1099 * The suffix must have already been defined.
1102 * sname Name of the suffix to mark
1108 * The SUFF_INCLUDE bit is set in the suffix's flags field
1128 * Add the given suffix as a type of file which is a library.
1130 * suffix must have been defined via .SUFFIXES before this is
1134 * sname Name of the suffix to mark
1140 * The SUFF_LIBRARY bit is set in the suffix's flags field
1162 * Add a suffix as a Src structure to the given list with its parent
1163 * being the given Src structure. If the suffix is the null suffix,
1167 * sp suffix for which to create a Src structure
1189 * If the suffix has been marked as the NULL suffix, also create a Src
1190 * structure for a file with no suffix attached. Two birds, and all
1454 * suffix.
1460 * It even has a known suffix, see if there's a transformation
1461 * defined between the node's suffix and the target's suffix.
1722 * If the word has a known suffix, use that path.
1723 * If it has no known suffix, use the default system search path.
1732 * XXX: We could set the suffix here so that we don't have to scan
1740 Suff *suff = gn->suffix;
1754 /* XXX: Here we can save the suffix so we don't have to do this again */
1759 fprintf(debug_file, "suffix is \"%s\"...", suff->name);
1779 * t Target suffix
1780 * s Source suffix
1891 * suffix for both of them.
1896 *eoname = '\0'; /* Nuke parentheses during suffix search */
1897 *eoarch = '\0'; /* So a suffix can be found */
1904 * to locate its suffix. This allows us to figure out the suffix to
1906 * suffix list, backtracking for each one...
1929 ms = mem->suffix;
1932 * Didn't know what it was -- use .NULL suffix if not in make mode
1935 fprintf(debug_file, "using null suffix\n");
1949 * Member has a known suffix, so look for a transformation rule from
1950 * it to a possible suffix of the archive. Rather than searching
1952 * member's suffix may be transformed...
1958 * Use first matching suffix...
2020 LstNode ln, nln; /* Next suffix node to check */
2049 * and we can't do that until we know what the proper suffix for the
2050 * target is (in case there are two suffixes one of which is a suffix of
2069 * Look for next possible suffix...
2092 * subtracting the length of the suffix from
2111 * Search from this suffix's successor...
2118 * Handle target of unknown suffix...
2122 fprintf(debug_file, "\tNo known suffix on %s. Using .NULL suffix\n", gn->name);
2138 * Only use the default suffix rules if we don't have commands
2140 * not define suffix rules if the gnode had children but we
2151 fprintf(debug_file, "adding suffix rules\n");
2158 * suffix(es), try and find an existing file/target that matches.
2164 * No known transformations -- use the first suffix found
2174 * Work up the transformation path to find the suffix of the
2198 fprintf(debug_file, "\tNo valid suffix on %s\n", gn->name);
2219 * Suffix known for the thing -- trim the suffix off
2225 if (gn->suffix)
2226 gn->suffix->refCount--;
2227 gn->suffix = targ->suff;
2228 gn->suffix->refCount++;
2244 * no known suffix.
2246 if (gn->suffix)
2247 gn->suffix->refCount--;
2248 gn->suffix = NULL;
2264 * If the suffix indicates that the target is a library, mark that in
2305 * transformation rule used to get from the src suffix to the targ
2306 * suffix. Note that this causes the commands list of the original
2318 if (src->node->suffix)
2319 src->node->suffix->refCount--;
2320 src->node->suffix = src->suff;
2321 src->node->suffix->refCount++;
2348 if (gn->suffix)
2349 gn->suffix->refCount--;
2350 gn->suffix = src->suff;
2351 gn->suffix->refCount++;
2389 * root suffix until a file is found. I.e. if there's a path
2440 * search path, assuming all libraries end in ".a" (if the suffix
2449 if (gn->suffix)
2450 gn->suffix->refCount--;
2452 gn->suffix = s = (Suff *)Lst_Datum(ln);
2453 gn->suffix->refCount++;
2456 gn->suffix = NULL;
2473 * Define which suffix is the null suffix.
2476 * name Name of null suffix
2485 * Need to handle the changing of the null suffix gracefully so the
2508 Parse_Error(PARSE_WARNING, "Desired null suffix %s not defined.",
2537 * Create null suffix for single-suffix rules (POSIX). The thing doesn't
2538 * actually go on the suffix list or everyone will think that's its
2539 * suffix.