diff options
author | jkh <jkh@FreeBSD.org> | 1996-07-01 22:55:57 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-07-01 22:55:57 +0000 |
commit | 8d17fabf36faadd2da33b7862da9cb978e16b4e2 (patch) | |
tree | 813a277f5fe59d301bb8636951ec325a01f506d3 /usr.bin/make/main.c | |
parent | cb335fec1f0c177e90d9ec57c5bb49f248b27957 (diff) | |
download | FreeBSD-src-8d17fabf36faadd2da33b7862da9cb978e16b4e2.zip FreeBSD-src-8d17fabf36faadd2da33b7862da9cb978e16b4e2.tar.gz |
Put back the $PWD override behavior of revision 1.4. The concensus
*seems* to be that it was the right thing to do.
Diffstat (limited to 'usr.bin/make/main.c')
-rw-r--r-- | usr.bin/make/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c index c3608f3..4094276 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. |