`make cleanworld` and /usr/obj/lib32/usr/src

Alexander Best alexbestms at wwu.de
Mon Mar 1 23:17:28 UTC 2010


jhell schrieb am 2010-03-01:

> On Sun, 28 Feb 2010 11:54, alexbestms@ wrote:
> >Gary Jennejohn schrieb am 2010-02-28:
> >>On Sat, 27 Feb 2010 14:49:58 +0100 (CET)
> >>Alexander Best <alexbestms at wwu.de> wrote:

> >>>how about something like this?


> >>Based on a quick look it seems OK to me.

> >>Have you tested it?

> >i did. it works when `make cleanworld` is being run from /usr/src.
> >i'm not
> >sure however what the

> >.if ${.CURDIR} == ${.OBJDIR} || ${.CURDIR}/obj == ${.OBJDIR}
> >.if exists(${BW_CANONICALOBJDIR}/)

> >statement is for so i didn't include the lib32 cleanup in that
> >clause. my
> >guess is that it's used to catch the case where `make cleanworld`
> >is being run
> >in /usr/obj/usr/src


> You can't run make from a obj directory there is no Makefile,
> Targets or spoons. ;)

> This line here:
> BW_CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR}

> Allows the end-user to set MAKEOBJDIRPREFIX in their environment and
> have the obj directory somewhere other than CANONICALOBJDIR.

this patch should take care of the lib32 dir with MAKEOBJDIRPREFIX being
defined or undefined.

cheers.
alex

> BW is an abbreviation for "buildworld".

> >cheers.
> >alex

> >>---
> >>Gary Jennejohn
> >_______________________________________________
> >freebsd-hackers at freebsd.org mailing list
> >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> >To unsubscribe, send any mail to
> >"freebsd-hackers-unsubscribe at freebsd.org"





> --

> jhell
-------------- next part --------------
Index: Makefile
===================================================================
--- Makefile	(revision 204540)
+++ Makefile	(working copy)
@@ -159,6 +159,11 @@
 	-chflags -R 0 ${.OBJDIR}
 	rm -rf ${.OBJDIR}/*
 .endif
+.if exists(${MAKEOBJDIRPREFIX}/lib32${.CURDIR}/)
+        -rm -rf ${MAKEOBJDIRPREFIX}/lib32${.CURDIR}/*
+        -chflags -R 0 ${MAKEOBJDIRPREFIX}/lib32${.CURDIR}  
+        rm -rf ${MAKEOBJDIRPREFIX}/lib32${.CURDIR}/*
+.endif
 
 #
 # Handle the user-driven targets, using the source relative mk files.


More information about the freebsd-hackers mailing list