Boost logo

Boost-Build :

Subject: Re: [Boost-build] How to refer to build directory from a source.
From: Duncan (gmane_at_[hidden])
Date: 2009-02-05 03:55:41


Vladimir Prus wrote:
> On Wednesday 04 February 2009 14:30:46 Duncan Rance wrote:
>> Vladimir Prus wrote:
>>> Duncan,
>>> from our IRC discussion I understand you'll be sending a revised example showing
>>> the actual problem?
>>>
>>> - Volodya
>> Okay. I've put together a test case. I would know where to upload a tar
>
> Just attach it to email.

I'll keep that in mind.

>
>> to so I'll
>> just paste it in at the bottom of this message. I've echoed -------- around each
>> file name.
>>
>> This case does build but there is one issue I'd like to resolve:
>>
>> The problem is that the Framework directory is supposed to be a stand-alone bit of
>> code that is reusable (it actually comes from a different svn repository.) A
>> prerequisite is that any user of the Framework provides a ResourcesEnum.h
>> containing ResourcesEnum_t and the function f.
>
> Uh-oh! Then, adding implicit-dependency to Framework does not seem very nice.
>
>> As you can see, I've had to use <implicit-dependency>../Resources//ResourcesEnum.h
>> in Framework/Jamfile. What I was trying previously was to pass the path to the
>> generated ResourcesEnum.h into the ../Framework//Framework target from the
>> Resources/Jamfile.
>>
>> I hope this makes it clear what I'm trying to do. Is there a way to do this
>> without referring to Resources in Framework?
>>
>> Regards,
>> Duncan
>>
>> Code follows:
>>
>> -------- ./Jamroot --------
>> using gcc ;
>> path-constant TOP : . ;
>> exe a : a.cpp Resources//FrameworkRes : <include>Framework <implicit-dependency>Resources//ResourcesEnum.h ;
>> -------- ./a.cpp --------
>> #include "Framework.h"
>> int main (int argc, char *argv[]) { return x(A); }
>> -------- ./Resources/Jamfile --------
>> modules.poke : BOOST_BUILD_PATH : [ modules.peek : BOOST_BUILD_PATH ] Framework ;
>> import resources ;
>> resource-lib rootres : root.rbs : <link>static ;
>> h ResourcesEnum.h : root.rbs ;
>> cpp ResourcesEnum.cpp : root.rbs ;
>> lib FrameworkRes : rootres ResourcesEnum.cpp ../Framework//Framework : <link>static ;
>
> Do things work if you:
>
> - Remove implicit-dependency from the Framework target
> - Rewrite the above line as:
>
>
> lib FrameworkRes : rootres ResourcesEnum.cpp ../Framework//Framework/<implicit-dependency>XXX : <link>static ;
>
> Thereby propagating property from outside. I did not test this, though this trick does work with
> <include> and then probably should work for <implicit-dependency>

You know, I thought of that too, in the middle of the night!

Just tried it and yes! It works!

First I tried just ResourcesEnum.h but I had to use
../Resources//ResourcesEnum.h which makes sense when you think about it.

Thanks very much for all your help!

Duncan

>
> - Volodya
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
>


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk