NetBSD-Users archive

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

Re: using build.sh in src subdirectories



On Tue, Jul 14, 2009 at 07:01:38PM -0400, Taylor R Campbell wrote:
> Sometimes I want to build just parts of NetBSD's source tree.  For
> example, if an OpenSSH security advisory is released, I might want to
> build and install src/usr.bin/ssh/, but nothing else.  However, I also
> want to keep my object and tool directories separate from my source
> directory.  build.sh has a convenient way to specify object and tool
> directories -- for an entire build or an entire install.  But if I
> want to specify this while making in only a subdirectory, the only way
> I know to do that is to run `build.sh params' and painstakingly copy
> all of the relevant parameters into an invocation of make(1) in the
> subdirectory.
> 
> Am I missing an obvious way to tell build.sh to make some target in a
> subdirectory, or give me a shell with all the relevant environment
> variables set up so that I can run make(1) (or the wrapper therefor)
> myself in a subdirectory?  If not, am I missing something about why
> not, or would this be something worth implementing?
> 
> Handling destdirs and installworlddirs might pose an issue for
> installing from a single source directory -- I don't know anything
> about how this works, but I imagine that it might take some effort to
> persuade build.sh to copy just those files from the destdir to the
> installworlddir that are relevant, since simply making the install
> target in the desired subdirectory will install files into the
> destdir, not into the installworlddir.

Have a look at the mk.conf(5) man page - I think that's where you
would put your parameters.

For building ssh, I would just

cd usr/usr.bin/ssh
make obj
make dependall
make install

as that would use the default tools and install to the running system
(as I don't have DESTDIR set in /etc/mk.conf)

Cheers,

Patrick


Home | Main Index | Thread Index | Old Index