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:
I generally like the idea of bsd.*.mk all just populating CLEAN*

I'm not so crazy about attempting to clean the src tree unless explicitly requested.

Would you suggest a variable or a target for that, and do you have name suggestions?

Apart from the issues cited of read-only src trees, it is a waste of time, when you never allow building without objdirs.

If you have a polluted read-only src tree, then the "ls" test in the new code will fail, letting you know that the src tree is polluted. If you have an unpolluted src tree, then the extra "rm" and "ls" commands do take some extra time, but it's negligible compared to the time for recursing through a sub-make process in each subdir.

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

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?

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index