Subject: Re: build only one program from tree
To: None <current-users@netbsd.org>
From: Marton Fabo <morton@eik.bme.hu>
List: current-users
Date: 07/16/2003 02:04:04
>>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 do-ld.so
>>
>>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 \
>         MKDYNAMICROOT=no USETOOLS=never
> 
> 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.
> 
> Frederick

Thanks for the extensive info, I'll try it out ASAP. I do realize that 
it works out of mere coincidence; I wouldn't try such a thing on my own 
unless having read it mentioned explicitely to work. But now it'll be 
useful for me.

thx
mortee