From b1795946fd54511db65b8428f68dad8a33c57cd4 Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Wed, 27 Aug 1997 06:31:27 +0000 Subject: [PATCH] Don't preferentially execute Makefiles in ${OBJDIR} - it just causes confusion and suffering. Tested by "make world". Submitted by: gibbs --- usr.bin/make/main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c index 84515c4c1271..a01c4a7771bb 100644 --- a/usr.bin/make/main.c +++ b/usr.bin/make/main.c @@ -47,7 +47,7 @@ static const char copyright[] = static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #endif static const char rcsid[] = - "$Id: main.c,v 1.20 1997/08/14 19:24:11 fsmp Exp $"; + "$Id: main.c,v 1.21 1997/08/25 21:35:44 fsmp Exp $"; #endif /* not lint */ /*- @@ -834,8 +834,6 @@ ReadMakefile(p, q) Parse_File("(stdin)", stdin); Var_Set("MAKEFILE", "", VAR_GLOBAL); } else { - if ((stream = fopen(fname, "r")) != NULL) - goto found; /* if we've chdir'd, rebuild the path name */ if (curdir != objdir && *fname != '/') { (void)sprintf(path, "%s/%s", curdir, fname); @@ -843,7 +841,8 @@ ReadMakefile(p, q) fname = path; goto found; } - } + } else if ((stream = fopen(fname, "r")) != NULL) + goto found; /* look in -I and system include directories. */ name = Dir_FindFile(fname, parseIncPath); if (!name)