Subject: Re: Kernel include files
To: None <current-users@NetBSD.ORG>
From: Giles Lean <>
List: current-users
Date: 01/06/1995 07:56:43
On Thu, 05 Jan 1995 00:56:36 -0800  Greg Earle wrote:

> Wow, thanks Charles.  I keep thinking of DESTDIR as a non-used no-op on most
> software systems ...

Almost. :-)

I think Charles views DESTDIR as being only for use with <>.
That is consistent with the files in /usr/share/mk/* except for the
partial support in <>.  Does anyone know why and when DESTDIR
was added to CPP in <>?

> That way, one could do a build and not even need to overwrite/override
> /usr/share/mk ...

I'm (slowly) working on DESTDIR related stuff.  A build is almost
clean, with the following problems:

1.  Makefiles not using <> or with custom rules fails.
    There are about a dozen of these in the -current source tree.

    Fixing them requires either re-writing them to use <>,
    incorporating too much of <> into each of them or adding
    more DESTDIR support to <>.

    I'm looking at the first two options at the moment. (Well, really
    I've been on holiday over Christmas. :-)

2. /usr/share/mk/* files

    I'm dubious about overloading VPATH, but Greg is correct that
    compilation with DESTDIR set pretty much requires that a different
    set of /usr/share/mk files be used.  Perhaps this should depend
    on DESTDIR too?

3.  Some makefiles in the NetBSD build environment compile programs
    and run them.  This is nasty, since if ${CC} was a cross-compiler
    these makefiles would generate code that couln't be run.

All in all, DESTDIR *looks* simple and isn't.