Module Name:    src
Committed By:   christos
Date:           Sat May 19 14:11:30 UTC 2018

Modified Files:
        src/share/mk: bsd.obj.mk

Log Message:
Prevent 'make obj' creating an objdir inside an objdir. This happens the
second time we call 'make obj' in /usr/src/rescue with MAKEOBJDIR set.
XXX: pullup-8


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/share/mk/bsd.obj.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.obj.mk
diff -u src/share/mk/bsd.obj.mk:1.51 src/share/mk/bsd.obj.mk:1.52
--- src/share/mk/bsd.obj.mk:1.51	Sat Dec 10 18:12:39 2016
+++ src/share/mk/bsd.obj.mk	Sat May 19 10:11:30 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.obj.mk,v 1.51 2016/12/10 23:12:39 christos Exp $
+#	$NetBSD: bsd.obj.mk,v 1.52 2018/05/19 14:11:30 christos Exp $
 
 .if !defined(_BSD_OBJ_MK_)
 _BSD_OBJ_MK_=1
@@ -27,6 +27,7 @@ obj:
 		exit 1; \
 	fi;
 .endif
+.if ${.CURDIR} == ${.OBJDIR}
 	@if [ ! -d ${__objdir} ]; then \
 		mkdir -p ${__objdir}; \
 		if [ ! -d ${__objdir} ]; then \
@@ -34,6 +35,7 @@ obj:
 		fi; \
 		${_MKSHMSG} " objdir  ${__objdir}"; \
 	fi
+.endif
 .else
 PAWD?=		/bin/pwd
 

Reply via email to