Lines Matching refs:file

1 /* Implementation of pattern-matching file search paths for GNU Make.
5 This file is part of GNU Make.
16 GNU Make; see the file COPYING. If not, write to the Free Software
52 static int selective_vpath_search PARAMS ((struct vpath *path, char **file, FILE_TIMESTAMP *mtime_ptr));
321 gpath_search (char *file, unsigned int len)
327 if (strneq (*gp, file, len) && (*gp)[len] == '\0')
336 the newly malloc'd name of the existing file, *MTIME_PTR (if MTIME_PTR is
341 vpath_search (char **file, FILE_TIMESTAMP *mtime_ptr)
348 if (**file == '/'
350 || **file == '\\'
351 || (*file)[1] == ':'
357 if (pattern_matches (v->pattern, v->percent, *file))
358 if (selective_vpath_search (v, file, mtime_ptr))
362 && selective_vpath_search (general_vpath, file, mtime_ptr))
371 name of the existing file, *MTIME_PTR (if MTIME_PTR is not NULL) to
376 selective_vpath_search (struct vpath *path, char **file,
392 struct file *f = lookup_file (*file);
396 flen = strlen (*file);
402 n = strrchr (*file, '/');
406 char *bslash = strrchr(*file, '\\');
411 name_dplen = n != 0 ? n - *file : 0;
412 filename = name_dplen > 0 ? n + 1 : *file;
440 bcopy (*file, n, name_dplen);
460 /* Check if the file is mentioned in a makefile. If *FILE is not
461 a target, that is enough for us to decide this file exists.
462 If *FILE is a target, then the file must be mentioned in the
466 makefile-mentioned file to be chosen was added by an
470 In December 1993 I loosened this restriction to allow a file
478 file* entry for the VPATH-found file, and set the renamed field if
482 struct file *f = lookup_file (name);
497 /* That file wasn't mentioned in the makefile.
509 Does the file we seek exist in it? */
516 /* The file is in the directory cache.
518 The cache may be out of date. When vpath thinks a file
529 if (exists_in_cache) /* Makefile-mentioned file need not exist. */
548 /* We have found a file.
551 *file = savestring (name, (n + 1 - name) + flen);