tech-toolchain archive

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

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

>How about this variable:
>                    If set to "yes" then the "clean" and "cleandir"

This sounds reasonable.

>                    targets will repeat their work in the source
>                    directory ${.CURDIR}, in addition to the usual
>                    work in ${.OBJDIR}.  If set to "no" then only
>                    ${.OBJDIR} is cleaned, which is the traditional
>                    behaviour.  The default is "???".
>I'd like the default to be "yes", to help people who run "make" 
>in a subdirectory of the source tree without obj dirs, then later 
>run a build with obj dirs.  In this situation, I'd like a "make 
>cleandir" at the start of the build to remove stray files in the 
>src tree.  The default can be switched to "no" by
>However, I would accept the default being "no", with
>setting it to "yes".

I'm biased towards "no" as the default, since it it means no behavior
change, so should be least surprising.

>Do you also want a knob to switch whether or not to use "ls" to 
>verify that "rm" worked?  If so, I'd really like the default to be 

I'm not convinced the "ls" thing is needed.
Anyone sharing a read-only src tree isn't able to polute it - unless
using unionfs, if the default is "no" though, it doesn't do any harm.

>I added two knobs in a test tree, and here are some timing results 
>     /usr/bin/time -c \
>     /bin/sh ./ -U -O ../obj \
>         cleandir >/dev/null
>in a NetBSD-current source tree with obj dirs.  I discarded the 
>first two timing results for each case, to warm the cache.

So MKCLEANSRC=yes MKCLEANVERIFY=yes cost about 40%
that's significant.

Home | Main Index | Thread Index | Old Index