tech-toolchain archive

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

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



At Thu, 29 Sep 2011 10:30:08 +0200, Alan Barrett <apb%cequrux.com@localhost> 
wrote:
Subject: Re: Changing "make clean" and "make cleandir"
> 
> On Thu, 29 Sep 2011, David Holland wrote:
> >On Thu, Sep 29, 2011 at 08:38:59AM +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.

Since the advent of cross-compiling I've always thought that a global
/etc/mk.conf is just plain wrong (except, I guess, for the special case
of where you do self-hosted builds on the target machine with
DESTDIR=/)

My own "mybuild.sh" wrapper script always adds the following to
"build.sh"'s command line:

        -V MAKECONF=\${NETBSDSRCDIR}/etc/mk.conf

However I do very much prefer dholland's later suggestion of TOPDIR.

I would also like to see the host tool "nbmake" always require that
either MAKEOBJDIR or MAKEOBJDIRPREFIX be set in the environment or on
the command line (i.e. ignore rules 3-6 for .OBJDIR).

-- 
                                                Greg A. Woods
                                                Planix, Inc.

<woods%planix.com@localhost>       +1 250 762-7675        http://www.planix.com/

Attachment: pgpgu8qFJwRls.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index