Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Dec 1998 21:28:27 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        dillon@apollo.backplane.com, freebsd-current@FreeBSD.ORG
Subject:   Re: 'make clean' in /usr/src does not cleanup .o's or shared libs ?
Message-ID:  <199812141028.VAA27034@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>    I'm trying to do a buildworld with /usr/src mounted read-only (via NFS).
>
>    The buildworld has died several times trying to remove .o files, binaries,
>    and libraries (*.so.*) from /usr/src that happened to be hanging around.
>
>    Ok, I say... cd /usr/src on the physical machine and 'make clean'.
>
>    Only problem is it doesn't work... it does not recursive through the entire
>    source hierarchy.  For example, make clean in /usr/src does not bother
>    recursing through /usr/src/bin, /usr/src/sbin, /usr/src/gnu, etc...

It does recurse.  This used to be fairly easy to see by typing
`make -n clean', but now you have to untangle 3 layers of nested
Makefiles to see what will happen, e.g.,

	make -n clean |
	sed 's/make/make -n/' | sh |
	sed 's/make/make -n/' | sh

`make clean' is the wrong command for cleaning the source tree.  It cleans
the object tree and should not touch the source tree unless the (separate)
obj tree is nonexistent or damaged.  To clean the source tree, first use
`make cleandir' or `rm -rf' or `mv' to clean or move the obj tree.  Then
the (non-separate) obj tree will be the source tree and it can be cleaned
using `make clean' or `make cleandir' (modulo obj subdirectories which
may require another cleandir pass to remove).

Bruce

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812141028.VAA27034>