Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/mk Prevent 'make obj' creating an objdir ...



details:   https://anonhg.NetBSD.org/src/rev/1e9b8bdd59e8
branches:  trunk
changeset: 319167:1e9b8bdd59e8
user:      christos <christos%NetBSD.org@localhost>
date:      Sat May 19 14:11:30 2018 +0000

description:
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

diffstat:

 share/mk/bsd.obj.mk |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r e71cf4256a34 -r 1e9b8bdd59e8 share/mk/bsd.obj.mk
--- a/share/mk/bsd.obj.mk       Sat May 19 14:02:10 2018 +0000
+++ b/share/mk/bsd.obj.mk       Sat May 19 14:11:30 2018 +0000
@@ -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 @@
                exit 1; \
        fi;
 .endif
+.if ${.CURDIR} == ${.OBJDIR}
        @if [ ! -d ${__objdir} ]; then \
                mkdir -p ${__objdir}; \
                if [ ! -d ${__objdir} ]; then \
@@ -34,6 +35,7 @@
                fi; \
                ${_MKSHMSG} " objdir  ${__objdir}"; \
        fi
+.endif
 .else
 PAWD?=         /bin/pwd
 



Home | Main Index | Thread Index | Old Index