summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rw-r--r--share/mk/bsd.obj.mk14
1 files changed, 10 insertions, 4 deletions
diff --git a/share/mk/bsd.obj.mk b/share/mk/bsd.obj.mk
index a271397fc29..1a65ba386e7 100644
--- a/share/mk/bsd.obj.mk
+++ b/share/mk/bsd.obj.mk
@@ -1,4 +1,4 @@
-# $OpenBSD: bsd.obj.mk,v 1.4 1996/08/23 17:45:10 niklas Exp $
+# $OpenBSD: bsd.obj.mk,v 1.5 1996/08/23 22:42:41 niklas Exp $
# $NetBSD: bsd.obj.mk,v 1.9 1996/04/10 21:08:05 thorpej Exp $
.if !target(obj)
@@ -6,10 +6,16 @@
obj:
.else
+.if defined(MAKEOBJDIR)
+__baseobjdir= ${MAKEOBJDIR}
+.else
+__baseobjdir= obj
+.endif
+
.if defined(OBJMACHINE)
-__objdir= obj.${MACHINE}
+__objdir= ${__baseobjdir}.${MACHINE}
.else
-__objdir= obj
+__objdir= ${__baseobjdir}
.endif
.if defined(USR_OBJMACHINE)
@@ -24,7 +30,7 @@ __usrobjdirpf=
.endif
.endif
-obj: _SUBDIRUSE
+obj! _SUBDIRUSE
@cd ${.CURDIR}; rm -f ${__objdir} > /dev/null 2>&1 || true; \
here=`/bin/pwd`; subdir=$${here#${BSDSRCDIR}/}; \
if test $$here != $$subdir ; then \