diff options
| author | Ruslan Ermilov <ru@FreeBSD.org> | 2005-10-17 15:56:26 +0000 |
|---|---|---|
| committer | Ruslan Ermilov <ru@FreeBSD.org> | 2005-10-17 15:56:26 +0000 |
| commit | fd9070970c3916dbf4a2051c42782e2acb973002 (patch) | |
| tree | 4c69c46ddbaee75befca3d235c118c7269a00d4f /usr.bin/make/parse.c | |
| parent | 42fb42a3998fbfb8a1c68c4a3666703f82169a70 (diff) | |
Notes
Diffstat (limited to 'usr.bin/make/parse.c')
| -rw-r--r-- | usr.bin/make/parse.c | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c index dda7afd78156..ae9db061cfc1 100644 --- a/usr.bin/make/parse.c +++ b/usr.bin/make/parse.c @@ -2130,7 +2130,7 @@ xparse_include(char *file, int sinclude) * Include files contained in double-quotes are first searched * for relative to the including file's location. We don't want * to cd there, of course, so we just tack on the old file's - * leading path components and call Dir_FindFile to see if + * leading path components and call Path_FindFile to see if * we can locate the beast. */ @@ -2155,28 +2155,27 @@ xparse_include(char *file, int sinclude) fullname = NULL; } free(Fname); - } else { - fullname = NULL; - } - - if (fullname == NULL) { - /* - * System makefile or makefile wasn't found in same directory as - * included makefile. Search for it first on the -I search path, - * then on the .PATH search path, if not found in a -I - * directory. - * XXX: Suffix specific? - */ - fullname = Path_FindFile(file, &parseIncPath); if (fullname == NULL) { - fullname = Path_FindFile(file, &dirSearchPath); + /* + * Makefile wasn't found in same directory as included + * makefile. Search for it first on the -I search path, + * then on the .PATH search path, if not found in a -I + * directory. + * XXX: Suffix specific? + */ + fullname = Path_FindFile(file, &parseIncPath); + if (fullname == NULL) { + fullname = Path_FindFile(file, &dirSearchPath); + } } + } else { + fullname = NULL; } if (fullname == NULL) { /* - * Still haven't found the makefile. Look for it on the system - * path as a last resort. + * System makefile or still haven't found the makefile. + * Look for it on the system path. */ fullname = Path_FindFile(file, &sysIncPath); } |
