Boost logo

Boost-Build :

Subject: Re: [Boost-build] How to refer to build directory from a source.
From: Vladimir Prus (ghost_at_[hidden])
Date: 2009-02-04 14:03:00


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.

> 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>

- Volodya


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