diff options
author | ru <ru@FreeBSD.org> | 2001-04-25 14:44:42 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2001-04-25 14:44:42 +0000 |
commit | d2b01e69fab833278598e1026bcac2bef56f74d0 (patch) | |
tree | 5262ef0ba56a7442cf71cd2e9477d747654576be /usr.bin/make | |
parent | eaf5ab661c732af63832ac313914235e6ba76fe7 (diff) | |
download | FreeBSD-src-d2b01e69fab833278598e1026bcac2bef56f74d0.zip FreeBSD-src-d2b01e69fab833278598e1026bcac2bef56f74d0.tar.gz |
unifdef -UWANT_ENV_PWD.
No one ever going to use this bugfeature.
Diffstat (limited to 'usr.bin/make')
-rw-r--r-- | usr.bin/make/main.c | 18 | ||||
-rw-r--r-- | usr.bin/make/make.1 | 37 |
2 files changed, 13 insertions, 42 deletions
diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c index 4ba3a6a..6c2381d 100644 --- a/usr.bin/make/main.c +++ b/usr.bin/make/main.c @@ -455,10 +455,6 @@ main(argc, argv) Boolean outOfDate = TRUE; /* FALSE if all targets up to date */ struct stat sa; char *p, *p1, *path, *pathp; -#ifdef WANT_ENV_PWD - struct stat sb; - char *pwd; -#endif char mdpath[MAXPATHLEN]; char obpath[MAXPATHLEN]; char cdpath[MAXPATHLEN]; @@ -491,7 +487,7 @@ main(argc, argv) } #endif /* - * Find where we are and take care of PWD for the automounter... + * Find where we are... * All this code is so that we know where we are when we start up * on a different machine with pmake. */ @@ -502,14 +498,6 @@ main(argc, argv) if (stat(curdir, &sa) == -1) err(2, "%s", curdir); -#ifdef WANT_ENV_PWD - 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); - } -#endif - #if defined(__i386__) && defined(__FreeBSD_version) && \ __FreeBSD_version > 300003 /* @@ -618,10 +606,6 @@ main(argc, argv) objdir = curdir; } -#ifdef WANT_ENV_PWD - setenv("PWD", objdir, 1); -#endif - create = Lst_Init(FALSE); makefiles = Lst_Init(FALSE); envFirstVars = Lst_Init(FALSE); diff --git a/usr.bin/make/make.1 b/usr.bin/make/make.1 index 91a416d..f49c32b 100644 --- a/usr.bin/make/make.1 +++ b/usr.bin/make/make.1 @@ -462,6 +462,11 @@ was executed with A path to the directory where .Nm was executed. +.Nm +sets +.Va .CURDIR +to the canonical path given by +.Xr getcwd 3 . .It Va .OBJDIR A path to the directory where the targets are built. At startup, @@ -501,6 +506,12 @@ If they are undefined and .Nm is unable to change into any of the remaining three directories, then the current directory is used. +.Pp +.Nm +sets +.Va .OBJDIR +to the canonical path given by +.Xr getcwd 3 . .It Va .MAKEFLAGS The environment variable .Ev MAKEFLAGS @@ -526,29 +537,6 @@ executes. A synonym for .Va .MAKEFLAGS provided for backward compatibility. -.It Ev PWD -Alternate path to the current directory. -Supported if built with WANT_ENV_PWD defined. -.Nm -normally sets -.Ql Va .CURDIR -to the canonical path given by -.Xr getcwd 3 . -However, if the environment variable -.Ev PWD -is set and gives a path to the current directory, then -.Nm -sets -.Ql Va .CURDIR -to the value of -.Ev PWD -instead. -.Ev PWD -is always set to the value of -.Ql Va .OBJDIR -for all programs which -.Nm -executes. .It Va .TARGETS List of targets .Nm @@ -1172,9 +1160,8 @@ uses the following environment variables, if they exist: .Ev MAKE , .Ev MAKEFLAGS , .Ev MAKEOBJDIR , -.Ev MAKEOBJDIRPREFIX , and -.Ev PWD . +.Ev MAKEOBJDIRPREFIX . .Sh FILES .Bl -tag -width /usr/share/doc/psd/12.make -compact .It Pa .depend |