Subject: Re: build only one program from tree
To: Bill Studenmund <>
From: Frederick Bruckman <>
List: current-users
Date: 07/15/2003 18:33:30
On Tue, 15 Jul 2003, Bill Studenmund wrote:

> On Tue, 15 Jul 2003, Marton Fabo wrote:
> > Can anyone tell me how I am supposed to build only sbin/atactl from the
> > current tree? I fetched the source tarballs from 07/15/2003, and
> > extracted all of them on a 1.6.1 i386 machine. I then built a full
> > toolchain, and tried to run the nbmake-i386 script in the sbin/atactl
> > directory, which resulted in:

> You'll need to build the libraries first.
> cd /usr/NetBSD-current/src
> nbmake-i386 obj do-distrib-dirs includes do-gnu-lib-libgcc do-lib-csu
> nbmake-i386 do-lib-libc do-lib-libpthread do-lib do-gnu-lib
> These make lines will do the intro part of a build, and should populate
> the destdir with what you need.

Of course, after all that, you'll get a binary that only runs *on*
*current*. If Martin wants to run it on 1.6.1, a natural assumption,
a little bit of make trickery suffices:

    make COPTS=-I/usr/src/sys DESTDIR=/ MAKECONF=/dev/null \

Follow by "make ... install", with the same arguments. This assumes
that there's a current source tree at "/usr/src". Adjust as necessary.

Martin, realize that it's just mad luck that it works at all. "atactl"
just happens to be drawing on the kernel sources for definitions and
variables in common with the kernel drivers, and not for anything
actually in the compiled kernel.