Boost logo

Boost-Build :

From: King, Steven R (steven.r.king_at_[hidden])
Date: 2006-04-25 18:57:01

I'm using the exe rule to build my application, which works fine. The
output is placed in the fully qualified path with
../release/link-static/threading-multi/... and all that. So far so

I'd like to use the install rule to copy the exe output to a human
friendly spot.

The install rule appears to be rebuild my application, and generates the
'duplicate name of actual target' error.

With 'dist' being the name of my install target, I can add 'explicit
dist' to the end of my Jamfile and build without errors in a two step
bjam --v2 -d2
bjam --v2 -d2 dist

Does this make sense? I would have thought that adding an install rule
would cause the exe rule to run first, then the install rule to run,
which "installs" the output from its exe dependency.

My Jamfile is below. Any guidance is much appreciated!

project gan_microbench ;

# Declare external buildable libraries.
# Using <use-project> instructs bjam to
# automatically build the external library
# with the proper os/compiler/threading etc
# variant depending on local requirements.
use-project /boost : $(BOOST_ROOT) ;

# Declare external pre-built libraries.
# Using <name> instructs bjam to automatically
# decorates the names appropriately for the
# current platform.
# The <link> declaration means we want shared
# object linking (i.e. not static).
lib xenctrl : : <name>xenctrl
                                <link>shared ;
lib xenstore : : <name>xenstore
                                <link>shared ;

# Create some convenient aliases for the
# staticly linked libraries we use.
alias boost_thread : /boost/thread//boost_thread/<link>static ;
alias configlib : $(SW_ROOT)/libs/configlib//configlib/<link>static ;
alias simlib : $(SW_ROOT)/libs/simlib//simlib/<link>static ;

exe gan_microbench
        : # source files
    [ glob src/*.cpp ]

        : # external dependencies
    # define DEBUG for debug builds
    # default build configurations
    : release debug

    # define CL_LINUX_USER for all builds


# only build this explicitly after
# the gan_microbench is built
# Otherwise, boost-build gives
# 'duplicate name of actual target' errors
install dist
        : # projects to install
        : release debug

explicit dist ;

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at