Subject: Re: build sourcesets problem
To: Luke Mewburn <lukem@NetBSD.org>
From: David Laight <david@l8s.co.uk>
List: current-users
Date: 08/21/2003 08:36:54
> 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.

With -O you can do other shell tricks like (cd src obj;ls).

Maybe there should be an option to tell make that there must always
be an OBJDIR, and that it should never stay in the source directory?
Maybe even be able to make make create the directory on the fly?

	David

-- 
David Laight: david@l8s.co.uk