Module Name: src
Committed By: rillig
Date: Sat Oct 31 16:13:00 UTC 2020
Modified Files:
src/usr.bin/make: main.c
Log Message:
make(1): revert requiring a writable objdir
The change in main.c 1.413 broke the NetBSD build.sh if it uses a
read-only source tree, as in the daily builds.
Original commit:
https://mail-index.netbsd.org/source-changes/2020/10/31/msg123560.html
Build log:
make warning: /home/source/ab/HEAD/src: Permission denied.
[1] Segmentation fault "${make}" -m ${T...
To generate a diff of this commit:
cvs rdiff -u -r1.418 -r1.419 src/usr.bin/make/main.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/main.c
diff -u src/usr.bin/make/main.c:1.418 src/usr.bin/make/main.c:1.419
--- src/usr.bin/make/main.c:1.418 Sat Oct 31 11:34:30 2020
+++ src/usr.bin/make/main.c Sat Oct 31 16:13:00 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.418 2020/10/31 11:34:30 rillig Exp $ */
+/* $NetBSD: main.c,v 1.419 2020/10/31 16:13:00 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -118,7 +118,7 @@
#include "trace.h"
/* "@(#)main.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: main.c,v 1.418 2020/10/31 11:34:30 rillig Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.419 2020/10/31 16:13:00 rillig Exp $");
#if defined(MAKE_NATIVE) && !defined(lint)
__COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
"The Regents of the University of California. "
@@ -721,7 +721,7 @@ Main_SetObjdir(const char *fmt, ...)
/* look for the directory and try to chdir there */
if (stat(path, &sb) == 0 && S_ISDIR(sb.st_mode)) {
- if (access(path, W_OK) || chdir(path)) {
+ if (chdir(path)) {
(void)fprintf(stderr, "make warning: %s: %s.\n",
path, strerror(errno));
} else {