Lines Matching refs:vpath
27 /* Structure used to represent a selective VPATH searchpath. */
29 struct vpath
31 struct vpath *next; /* Pointer to next struct in the linked list. */
41 static struct vpath *vpaths;
43 /* Structure for the general VPATH given in the variable. */
45 static struct vpath *general_vpath;
49 static struct vpath *gpaths;
52 static int selective_vpath_search PARAMS ((struct vpath *path, char **file, FILE_TIMESTAMP *mtime_ptr));
54 /* Reverse the chain of selective VPATH lists so they
56 and construct the list from the VPATH variable. */
61 register struct vpath *new = 0;
62 register struct vpath *old, *nexto;
75 /* If there is a VPATH variable with a nonnull value, construct the
76 general VPATH list from it. We use variable_expand rather than just
84 p = variable_expand ("$(strip $(VPATH))");
92 struct vpath *save_vpaths = vpaths;
124 struct vpath *save_vpaths = vpaths;
141 /* Construct the VPATH listing for the pattern and searchpath given.
143 This function is called to generate selective VPATH lists and also for
144 the general VPATH list (which is in fact just a selective VPATH that
146 linked list of all selective VPATH lists or in the GENERAL_VPATH
150 pattern. If PATTERN is nil, remove all VPATH listings. Existing
154 and put in the VPATH searchpath for the given pattern with trailing
165 register char **vpath;
179 register struct vpath *path, *lastpath;
185 struct vpath *next = path->next;
218 /* Figure out the maximum number of VPATH entries and put it in
228 vpath = (char **) xmalloc (maxelem * sizeof (char *));
267 vpath[elem++] = dir_name (v);
284 struct vpath *path;
289 vpath = (char **) xrealloc ((char *) vpath,
292 /* Put the nil-pointer terminator on the end of the VPATH list. */
293 vpath[elem] = 0;
295 /* Construct the vpath structure and put it into the linked list. */
296 path = (struct vpath *) xmalloc (sizeof (struct vpath));
297 path->searchpath = vpath;
310 free ((char *) vpath);
334 /* Search the VPATH list whose pattern matches *FILE for a directory
343 register struct vpath *v;
345 /* If there are no VPATH entries or FILENAME starts at the root,
369 /* Search the given VPATH list for a directory where the name pointed
376 selective_vpath_search (struct vpath *path, char **file,
382 register char **vpath = path->searchpath;
416 /* Allocate enough space for the biggest VPATH entry,
422 /* Try each VPATH entry. */
423 for (i = 0; vpath[i] != 0; ++i)
429 /* Put the next VPATH entry into NAME at N and increment N past it. */
430 vlen = strlen (vpath[i]);
431 bcopy (vpath[i], n, vlen);
478 file* entry for the VPATH-found file, and set the renamed field if
501 exists_in_cache = exists = dir_file_exists_p (vpath[i], filename);
518 The cache may be out of date. When vpath thinks a file
568 /* Print the data base of VPATH search paths. */
574 register struct vpath *v;
576 puts (_("\n# VPATH Search Paths\n"));
585 printf ("vpath %s ", v->pattern);
593 puts (_("# No `vpath' search paths."));
595 printf (_("\n# %u `vpath' search paths.\n"), nvpaths);
598 puts (_("\n# No general (`VPATH' variable) search path."));
604 fputs (_("\n# General (`VPATH' variable) search path:\n# "), stdout);