Subject: Re: cleandir phase
To: Arto Huusko <>
From: Patrick Welche <>
List: current-users
Date: 02/11/2003 15:17:50
On Mon, Feb 10, 2003 at 07:46:24PM +0200, Arto Huusko wrote:
> I've just started to learn using, and I found the following
> odd behaviour (which may of course be my fault).
> After got the make bootstrapped, it started the cleandir phase, 
> and:
> 1. How come it tries to clean the directories in the source tree (which is
>    readonly, and doesn't matter anyway, since objdir is somewhere else).
>    Is this my error?
> 2. If 1 is fixed, should there be some intelligence that cleandir not be
>    done if the objdir does not exist?

Let's say I'm compiling "cat". bin/cat contains (apart from CVS directory)

Makefile cat.1 cat.c

If I just make, without an objdir, the objects (cat.cat1 cat.o cat) will just
be made in bin/cat. Those objects will be removed by a cleandir from bin/cat.
If you do have an objdir which is a symbolic link to a writeable partition
(as you had bin/cat on a ro nfs partition), then those objects will appear
in that objdir, and a clean would clean them.

I hope that explains
1. you aren't deleting files from the read only partition because you do
   have an objdir
2. cleandir has to be done if you don't have an objdir, else the objects
   would be left behind in the source directory.