building only part of the world

Matthew Seaman m.seaman at
Mon Aug 4 10:00:31 UTC 2008

perryh at wrote:
> How would I go about building, not the entire world, but only
> a small part of it?
> If I just cd to the desired subdirectory and type "make -n"
> -- intending to find out what it would try to do -- I get a
> warning about not having changed the object directory.
> I suppose I'm supposed to type something along the lines of
>   make -n OBJ=<something>
> but what should I be setting OBJ to?  An attempt to find(1)
> some of the expected output files, so as to discover where
> they are conventionally located, found nothing.

The usual command sequence for building in parts of the source tree

   # cd /usr/src/some/where
   # make obj
   # make depend
   # make
   # make install

This will suppress the warnings.

Compiling part of the system sources is supported.  It's routinely
described in many security advisories.  See for instance section (2)
'To patch your present system' in

You'll find the output somewhere under /usr/obj 



Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP:     Ramsgate
                                                  Kent, CT11 9PW

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 258 bytes
Desc: OpenPGP digital signature
Url :

More information about the freebsd-questions mailing list