Subject: blowing away /usr/src object dirs
To: None <current-users@netbsd.org>
From: Wolfgang Rupprecht <wolfgang@wsrcc.com>
List: current-users
Date: 05/14/1999 08:40:04
I was experimenting with using /usr/src object dirs to keep my sparc
and i386 both happy.  Either my ss5 just got dog slow (over 8.5 hrs
and I'm still only up to usr.bin/egcs/common), my memory is going, or
these object dirs add a bit of overhead.  If this ever finishes I'll
do a build the other way.  This does lead to the next question:

What's the approved way to blow away the object dirs?  I didn't
immidiately see any way so I added this hack to bsd.obj.mk
to allow "make MKOBJ=no obj" to do a cleanup.  Comments?

-wolfgang


--- bsd.obj.mk.~1~      Sun May  2 13:39:11 1999
+++ bsd.obj.mk  Thu May 13 22:05:34 1999
@@ -5,15 +5,16 @@
 .include <bsd.own.mk>
 .endif
 
-.if ${MKOBJ} == "no"
-obj:
-.else
-
 .if defined(OBJMACHINE)
 __objdir=      obj.${MACHINE}
 .else
 __objdir=      obj
 .endif
+
+.if ${MKOBJ} == "no"
+obj:
+       cd ${.CURDIR}; rm -f ${__objdir} > /dev/null 2>&1 || true;
+.else
 
 .if defined(USR_OBJMACHINE)
 __usrobjdir=   ${BSDOBJDIR}.${MACHINE}


#
# EOF
#