Boost logo

Boost-Build :

Subject: Re: [Boost-build] Specify location for executable
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2010-01-27 12:24:43


Beman Dawes wrote:

> boost-root/libs/filesystem/example has a jamfile that builds various example
> programs. Works fine, placing the resulting executable deep in a directory
> hierarchy that begins C:\boost\trunk\libs\filesystem\example\...
>
> For a tutorial I'm working on, I'd like to pass bjam an argument that says
> "place the executable in the current directory. It doesn't matter if current
> directory is spelled "." or "boost-root/libs/filesystem/example".
>
> What would the bjam command line look like to do that?

You cannot do that on the command line, at least not without putting everything in
the same directory. You can have this in Jamfile:

        install convenient-copy : <your-executable-target-name> : <location>. ;

This will always place a copy of the binary in the same directory as Jamfile is.
If you really need current directory, that would be:

        import path ;
        local c = [ path.pwd ] ;
        install convenient-copy : <your-executable-target-name> : <location>$(c) ;

but I am not sure you want this.

- 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