cleaning /usr/obj before copying it to USB key

Garance A Drosehn gad at FreeBSD.org
Tue Jun 19 23:43:53 UTC 2012


On 6/11/12 8:34 AM, Matthias Apitz wrote:
> Thanks for the hints concerning find(1) usage. I was wondering if there
> is nothing like
>
> # make install-clean
> or
> # make remove-tempfiles
>
> Thanks
>
> 	matthias
>    
I missed the beginning of this thread, but if you're talking about doing
a 'make buildworld' and 'make installworld', then note that there is also
a target for /usr/src called 'make cleanworld'.  This will clean up the
files from 'make buildworld', but would not clean up files in /usr/obj
which were created by other things (such as ports, for instance).

The subject says "before copying to USB key".  Another thing you could
do is build up an 'rsync' command with the appropriate set of options
such that /usr/obj is not copied to your USB key.  I don't know if that
option makes sense for what you are trying to do.

Another thing you could do is to set the environment variable
MAKEOBJDIRPREFIX before you do buildworld and installworld, so that
those are not using /usr/obj at all.  This is a little trickier to
do right, and you'll regret it if you do not set the variable in all
the situations that you want to.  But it might be another option for you.

-- 
Garance Alistair Drosehn            =   gad at gilead.netel.rpi.edu
Senior Systems Programmer           or  gad at freebsd.org
Rensselaer Polytechnic Institute    or  drosih at rpi.edu



More information about the freebsd-hackers mailing list