aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2005-11-16 08:25:19 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2005-11-16 08:25:19 +0000
commite7c6654f7b9c8832e3756b8a0b5eeee3587ced68 (patch)
tree48f3e4cd8aa9667b3d37a6ae684fe865bf64cb69 /usr.bin
parent3ed2489b1467cc52dc19d6d14236e28bb4583bbe (diff)
Notes
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/make/parse.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index 4d6610313d07..3491448d4dba 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -2128,7 +2128,7 @@ parse_include(char *file, int code __unused, int lineno __unused)
* 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.
*/
@@ -2153,28 +2153,27 @@ parse_include(char *file, int code __unused, int lineno __unused)
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);
}