Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make main.c now exports curdir[] so we can use it.
details: https://anonhg.NetBSD.org/src/rev/2640c6551e11
branches: trunk
changeset: 762870:2640c6551e11
user: sjg <sjg%NetBSD.org@localhost>
date: Fri Mar 04 04:55:51 2011 +0000
description:
main.c now exports curdir[] so we can use it.
diffstat:
usr.bin/make/meta.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diffs (45 lines):
diff -r 8eb282616d61 -r 2640c6551e11 usr.bin/make/meta.c
--- a/usr.bin/make/meta.c Fri Mar 04 04:53:28 2011 +0000
+++ b/usr.bin/make/meta.c Fri Mar 04 04:55:51 2011 +0000
@@ -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;
Home |
Main Index |
Thread Index |
Old Index