[jamming] Building Objects - Need to reference with grist when using them in another jam file?

Craig Allsop cjamallsop at gmail.com
Thu Dec 18 16:07:07 PST 2008


As Diane suggested, SOURCE_GRIST it could be anything.. to make it
easier why not just make it the same as the library for that set of
sources if its enough to distinguish between sources - it doesn't have
to equal the default value of the "current directory". i.e.

rule FrameworkObjects
{
   local SOURCE_GRIST = $(<) ;
   return [ FGristFiles $(>:S=$(SUFOBJ)) ] ;
}

Now set SOURCE_GRIST in the component/framework's jamfiles to the name
of the library.

Craig.

On Fri, Dec 19, 2008 at 6:53 AM, John Waugh <john.waugh at gmail.com> wrote:
> On Thu, Dec 18, 2008 at 7:23 AM, Diane Holt <holt.diane at gmail.com> wrote:
>> Oh, sorry -- I read this too quickly -- I missed that you were building them
>> out to PRODUCT_LIB_DIR. In that case, I'd recommend writing a wrapper rule
>> around Objects (which I assume is what you're using to compile the source
>> files), that sets SOURCE_GRIST to whatever you want it to be. Then you can
>> list just the simple filenames in LibraryFromObjects.
>>
>
> If I understand the original question, it looks like there can be
> objects of the same name in various 'framework' directories, so he
> couldn't just use the base filenames in LibraryFromObjects. There
> would be no way to distinguish if it was 'object_2' from framework2 or
> framework3 (reading the example LibraryFromObjects statement very
> closely).
>
> There needs to be some way to distinguish between low-level objects
> from the top-level library creation step.



More information about the jamming mailing list