summaryrefslogtreecommitdiff
path: root/usr.bin/make
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1996-07-01 22:55:57 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1996-07-01 22:55:57 +0000
commitc4d74c02f2f36281f524ccedc28b8679e511a1ef (patch)
tree813a277f5fe59d301bb8636951ec325a01f506d3 /usr.bin/make
parent1b83dffc37343062ae858ac03a265eae0e45b598 (diff)
Notes
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c
index c3608f35ee9f..4094276d236f 100644
--- a/usr.bin/make/main.c
+++ b/usr.bin/make/main.c
@@ -396,6 +396,12 @@ main(argc, argv)
exit(2);
}
+ if ((pwd = getenv("PWD")) != NULL) {
+ if (stat(pwd, &sb) == 0 && sa.st_ino == sb.st_ino &&
+ sa.st_dev == sb.st_dev)
+ (void) strcpy(curdir, pwd);
+ }
+
/*
* Get the name of this type of MACHINE from utsname
* so we can share an executable for similar machines.