[Box Backup-dev] make clean

Ben Summers boxbackup-dev@fluffy.co.uk
Fri, 3 Feb 2006 09:45:58 +0000


On 3 Feb 2006, at 09:27, Chris Wilson wrote:

> Hi Stefan,
>
>> "make clean" from top-level only deletes packages and not
>> object files... I find this a bit confusing sometimes (I am very
>> easily confused). :-)
>
> I agree that "make clean" should be fixed. I have a patch in the  
> Boxi tree that does this; basically it does:
>
> 	find . -name '*.o'   | xargs -r rm
> 	find . -name '*.a'   | xargs -r rm
>
> But now that I think about it, it would probably be better to do:
>
> 	find release -type f | xargs -r rm
> 	find debug   -type f | xargs -r rm
>
> Or even to wipe out the release and debug trees, and recreate them.
>
> However, if we did this, it would no longer be possible to use  
> "make" to do an incremental rebuild of box, because "make" fails if  
> the parcels already exist, and "make clean" is the only target that  
> just removes them (and not the built object files). I think that  
> "make all" should not die if the parcels already exist, but delete  
> or overwrite them.

I never use make in the top level while developing. If you make in a  
test/* directory, it all works as you need. make in the top level is  
really just for people compiling it ready to actually use.

Ben