In case $MAKEOBJDIR is not a directory or we cannot stat it, then we
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 3 Jan 1994 06:59:04 +0000 (22:59 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 3 Jan 1994 06:59:04 +0000 (22:59 -0800)
restore the path to .
From: christos@deshaw.com (Christos Zoulas)

SCCS-vsn: usr.bin/make/main.c 8.2

usr/src/usr.bin/make/main.c

index 353b41f..ba34c24 100644 (file)
@@ -17,7 +17,7 @@ static char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)main.c     8.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c     8.2 (Berkeley) %G%";
 #endif /* not lint */
 
 /*-
 #endif /* not lint */
 
 /*-
@@ -389,8 +389,10 @@ main(argc, argv)
                else
                        setenv("PWD", path, 1);
        }
                else
                        setenv("PWD", path, 1);
        }
-       else 
+       else {
                setenv("PWD", curdir, 1);
                setenv("PWD", curdir, 1);
+               path = ".";
+       }
 
        create = Lst_Init(FALSE);
        makefiles = Lst_Init(FALSE);
 
        create = Lst_Init(FALSE);
        makefiles = Lst_Init(FALSE);