Subject: Re: build sourcesets problem
To: John Nemeth <jnemeth@victoria.tc.ca>
From: Luke Mewburn <lukem@NetBSD.org>
List: current-users
Date: 08/21/2003 10:05:07
On Wed, Aug 20, 2003 at 01:25:54AM -0700, John Nemeth wrote:
  | On Dec 18,  5:12pm, Luke Mewburn wrote:
  | } On Sun, Jul 27, 2003 at 10:39:01PM -0700, John Nemeth wrote:
  | }   | It looks like the build system was left in the wrong directory after it
  | }   | finished building tools.
  | } 
  | } Good catch; I've committed a fix.
  | 
  |      Thanks.  That is working.
  | 
  |      Now, I have a different problem :->  I do periodic "cvs update"s
  | followed by "./build.sh ... sourcesets ...".  I noticed my CD images
  | were rather large (over 400M).  When I investigated, I found that my
  | sourcesets were full of .o files.  Is this a bug in the way the
  | sourcesets are built, or am I supposed to use an object directory in
  | order not to have my source tree polluted?  If the latter, what is the
  | difference between -M and -O.  The documentation for these options
  | isn't very clear.

I developed the `sourcesets' option on a system where I have read-only
source and separate objdirs, and I don't think there's an easy way to
support this option with "in-tree" builds.  So, using objdirs is the
recommended approach here.

The difference between -M and -O is as follows:

    -M modp	set MAKEOBJDIRPREFIX to `modp'.
		OBJDIR for /path/to/src/bin/ls becomes
		modp/path/to/src/bin/ls
		(I.e.,  $MAKEOBJDIRPREFIX/`pwd`).

    -O mod	set MAKEOBJDIR to `mod'.
		OBJDIR for /path/to/src/bin/ls becomes
		mod/bin/ls
		(I.e., a "sanitized" path)

-O results in shorter paths under the top of the obj tree, but -M
allows for shell tricks like  ls $MAKEOBJDIRPREFIX/$cwd
to get to the objdir.  It's all a matter of personal preference.


Luke.