Boost logo

Boost-Build :

From: aulwelling_at_[hidden]
Date: 2007-01-05 17:27:07


Hi,

I've been working on migrating my group's build system from boost jam to
boost build v2. The old rules we had used the MakeLocate rule to set
the output location for the resulting libraries. Now I am using
build-dir in my top level project to direct all of my output to a
directory which is just what I want for intermediate build files.
However, I need to install the generated libraries to a different
location.

I think I can use the install rule to accomplish this, but I'm having
trouble figuring out how. In my Jamroot file I specify two custom rules
which end up using the lib rule to build libraries. Then each project
contains two targets, one of each of my custom type. These two
libraries are not dependent on each other. Example:

Jamroot defines 2 custom library rules that are similar but with
different external projects added in:

Rule customLibrary1 ( base-name : sources * )
{
  local LibName = custom1_$(base-name) ;
  lib $(LibName)
    : $(sources)
      /top//ext-source1
      /top//ext-libs1
    :
    ;
}

Project Jamfile (the system will contain many of these projects, each of
which builds 2 libraries):

Project proj1 : ;
BaseName = proj1 ;
customLibrary1 $(BaseName)
  : file1.cc file2.cc
;
customLibrary2 $(BaseName)
  : file3.cc file4.cc
;

When the library is built successfully I'd like it to be copied (along
with some helper text files) to directories specified by environment
variables. For example, the text files would be installed to
$DEV_DIR/text and the libraries would be installed to $DEV_DIR/lib
(which is in each user's $LD_LIBRARY_PATH). The text files are not
created by the build but are stored in source control along with the
source code. The other fun part is that the text files need to be made
read-only when they are copied. Is this possible with boost or would I
need to use a script/shell command to do this? Also, how do install
rules get invoked? Is it a second step like "bjam install" or can it be
made automatic when building a target?

If someone could point me in the right direction I'd appreciate it.
I've tried searching the message archives but it looks like this aspect
of boost has changed a bit (stage vs. install) and I'm not sure what
documentation to focus on.

Thanks,
Ashley



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