Module Name: src Committed By: sjg Date: Fri Mar 4 04:55:51 UTC 2011
Modified Files: src/usr.bin/make: meta.c Log Message: main.c now exports curdir[] so we can use it. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/meta.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/meta.c diff -u src/usr.bin/make/meta.c:1.8 src/usr.bin/make/meta.c:1.9 --- src/usr.bin/make/meta.c:1.8 Sun Feb 13 21:22:41 2011 +++ src/usr.bin/make/meta.c Fri Mar 4 04:55:51 2011 @@ -386,10 +386,8 @@ extern char **environ; meta_file_t mf; char buf[MAXPATHLEN]; - char curdir[MAXPATHLEN]; char objdir[MAXPATHLEN]; char **ptr; - const char *cname; const char *dname; const char *tname; char *fname; @@ -415,7 +413,6 @@ i = 0; dname = Var_Value(".OBJDIR", gn, &p[i++]); - cname = Var_Value(".CURDIR", gn, &p[i++]); tname = Var_Value(TARGET, gn, &p[i++]); /* The object directory may not exist. Check it.. */ @@ -436,11 +433,9 @@ /* make sure these are canonical */ if (realpath(dname, objdir)) dname = objdir; - if (realpath(cname, curdir)) - cname = curdir; /* If we aren't in the object directory, don't create a meta file. */ - if (strcmp(cname, dname) == 0) { + if (strcmp(curdir, dname) == 0) { if (DEBUG(META)) fprintf(debug_file, "Skipping meta for %s: .OBJDIR == .CURDIR\n", gn->name); @@ -1096,8 +1091,7 @@ ln = Lst_Succ(ln); } } else if (strcmp(buf, "CWD") == 0) { - char curdir[MAXPATHLEN]; - if (strcmp(p, getcwd(curdir, sizeof(curdir))) != 0) { + if (strcmp(p, curdir) != 0) { if (DEBUG(META)) fprintf(debug_file, "%s: %d: the current working directory has changed from '%s' to '%s'\n", fname, lineno, p, curdir); oodate = TRUE;