tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Changing "make clean" and "make cleandir"



>On Tue, 27 Sep 2011, Simon J. Gerraty wrote:
>Would you suggest a variable or a target for that, and do you have 
>name suggestions?

make clean-src
make clean-srcdir

or MKOBJDIRS=no make clean

?

>How would you suggest implementing a policy of never building 
>without objdirs?

By creating them automatically.
Using .error might be a bit harsh.

>> FWIW I also favor 'make destroy' (which rm -rf's the objdir) 
>> over 'make clean*'.  Destroy is much faster, and more 
>> reliable/thorough, and since if using auto.obj.mk the objdir 
>> will be auto created when next you run make - no hassle.
>
>Can you share an implementation of auto.obj.mk?

Sure.  It is inlcuded in my mk files collection:

http://www.crufty.net/ftp/pub/sjg/mk.tar.gz

which is a symlink to the latest version:

http://www.crufty.net/ftp/pub/sjg/mk-20110808.tar.gz

and

ftp://ftp.netbsd.org/pub/NetBSD/misc/sjg/mk-20110808.tar.gz

We've been using it in the Junos build since 2004

BTW the above archive also contains the bits needed to leverage 
meta mode in recent make - as described at BSDcan.

We are about to finish our roll-out of this, and I'll be 
updating mk.tar.gz with the latest editions of dirdeps.mk etc.

--sjg


Home | Main Index | Thread Index | Old Index