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 Thu, Sep 29, 2011 at 10:30:08AM +0200, Alan Barrett wrote:
 > >> How would you suggest implementing a policy of never building
 > >> without objdirs?
 > >
 > >something like
 > >
 > >.if "${OBJDIR}" == "${.CURDIR}"
 > >.error "Building without objdirs"
 > >.endif
 > 
 > That part's easy, but how would you tell make whether or not to use
 > that rule?  The policy should be per source tree, so a global
 > mk.conf would not be the right place for it.

Why not make it unconditional? Building without objdirs doesn't work,
no point pretending it's a user-serviceable part.

 > Perhaps bsd.own.mk should try .-include .../mk.conf as well as
 > .-include ${MKCONF}.  ".../filename" is magic syntax understood by
 > .include that means "try ., .., ../.., ../../.., etc."

Blah. No. If we're going to do that, we should bite the bullet and
define TOPDIR somewhere (with the right number of ../'s) and just do
.-include "$(TOPDIR)/mk.conf".

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index