Boost logo

Boost-Build :

From: Daniel Schlyder (daniel_at_[hidden])
Date: 2006-12-07 01:02:52


Vladimir Prus wrote:
> On Wednesday 06 December 2006 05:40, Deane Yang wrote:
>> In the documentation of Boost Build v2 (specifically,
>>
>> http://boost.sourceforge.net/boost-build2/doc/html/bbv2/tasks/installing.html
>>
>> )
>>
>> it states that the install rule can be used to install built target and
>> arbitrary files. But I can't find any explanation for how to install an
>> arbitrary file that does not correspond to any target type. For example,
>> a *.txt file. Can someone tell me how to do this?
>
> It would have helped if you provide a example project that does not work. The following Jamroot
> works fine for me:
>
> install dist : a.txt ;

I meant to ask this a while ago:

install dist : a.txt ;

works, but say you have

exe foo : ... ;

install dist : a.txt foo
     : <install-dependencies>on <install-type>SHARED_LIB ;

I naively thought this would install a.txt and the foo executable plus
all of their shared library dependencies, but <install-type> also
affects what sources are installed, so this won't install a.txt or foo.
Maybe this is the cause of the OP's problem?

Let's say you only want to install the foo exe and its shared library
dependencies. I figured this would do the trick:

exe foo : ... ;

install dist : foo
     : <install-dependencies>on
       <install-type>EXE <install-type>SHARED_LIB ;

but it ended up also installing a helper executable created to generate
headers for a lib foo used, and I didn't want that. Now I have separate
install targets for executables and their dependencies like this:

install dist_exes
     :
         foo
     :
         <location>dist
     ;

install dist_dlls
     :
         foo
     :
         <location>dist
         <install-dependencies>on
         <install-type>SHARED_LIB
     ;

alias dist : dist_exes dist_dlls ;

Which brings me to my question: Shouldn't there be
<install-dependency-type> as well as <install-type> so I could write the
above as

install dist
     :
         foo
     :
         <install-dependencies>on
         <install-dependency-type>SHARED_LIB
     ;

?

-- 
Daniel Schlyder

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