Boost logo

Boost-Build :

From: Phillip Seaver (phil_at_[hidden])
Date: 2007-03-15 14:47:53


Fabien Chêne wrote, on 3/15/2007 1:04 PM:
> Phillip Seaver <phil_at_[hidden]> writes:
>
>
>> Fabien Chêne wrote:
>>
>>> Hi,
>>>
>>> I'm trying to install generated sources (hpp file and cpp file).
>>> for exemple, using bison.jam, I would like to copy generated files in
>>> other directories.
>>>
>>> I would like foo.hpp to be copied in ./include, foo.cpp to be copied
>>> in ./src, and foo.yy not copied anywhere.
>>> I also want libtoto to be installed in ./lib
>>> I try something like that :
>>>
>>> ----------------
>>> import bison ;
>>>
>>> lib toto
>>> :
>>> foo.yy
>>> :
>>> <location>include
>>> ;
>>>
>>> install dist : toto
>>> :
>>> #<install-dependencies>on <install-type>HPP <install-type>CPP
>>> # ^ doesn't help
>>> <location>lib
>>> -----------------
>>>
>>> Unfortunately, foo.cpp and foo.hpp are copied in the same directory.
>>> How can copy them in different directories ?
>>>
>>> Thanks.
>>>
>> I haven't tested it, but would this work?
>>
>> install dist-hpp : toto
>> : <install-dependencies>on <install-type>HPP <location>include ;
>>
>> install dist-cpp : toto
>> : <install-dependencies>on <install-type>CPP <location>src ;
>>
>> install dist : toto
>> : <install-dependencies>on <install-type>LIB <location>lib ;
>>
>
> Thanks for your answer,
>
> I like this syntax, but, unfortunately, it doesn't work for me :-(
> It only installs the library, not the CPP and HPP files. Any ideas
> about what's going wrong ?
>
> Thanks,

The only thing that comes to mind immediately is that you're running
"bjam dist" which would not do "dist-cpp" and "dist-hpp". You might be
able to add "dist-cpp" and "dist-hpp" as dependencies of "dist" like:

install dist : toto dist-hpp dist-cpp
    : <install-dependencies>on <install-type>LIB <location>lib ;

I'll look at it tonight when I have more free time, if that doesn't work
for you. I've done something similar in the past, so I think it's able
to be done.

Phillip


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