[C++-sig] Redirecting the bjam output

Rene Rivera grafik.list at redshift-software.com
Wed Feb 18 23:50:27 CET 2004

Shukla, Nitin (Export) wrote:

> Sorry if I caused any confusion. What I am wondering is this? 
> Whenever I build my module from inside the Boost project tree my build
> output i.e. *.pyd, *.lib etc. files are generated under following directory
> structure:
> ${BOOSTROOT}/bin/boost/libs/python/${Currentfolder_name}/${BOOST_PYTHON_MODU
> LE}.pyd/${-sTOOLS}/${-sBUILD}
> If I build say the 'example' or the 'tutorials' that comes with the boost
> directory the outputs go to the above path. But if I build a module outside
> the boost project directory, the bjam tool creates the following directory
> structure under the current working folder to output the *.pyd and other
> files.
> currentworkingdirectory/bin/${Currentfolder_name}/${BOOST_PYTHON_MODULE}.pyd
> /${-sTOOLS}/${-sBUILD}
> I want that the .pyd and other files to be generated under
> "currentworkingdirectory" rather the above directory structure. If
> redirection can happen for modules built from boost project tree, I feel I
> should be able to generate outputs in my current working folder.

OK now I understand... Yes it's possible to put the generated file anywhere, 
but it's a design issue with the build system. We can't assume that you are 
only using one compiler. And for Boost most developers use many compilers at 
once. Changing this would require modifying the build system itself, as the 
subdirectories are hard-wired into the way it builds.

That only leaves copying the generated final products to the location of you 
liking. You can make that choice because only you know that when you copy them 
there are no collisions from separate compilers (this also includes 
debug/release/profile/etc differences).

To copy them the easiest is to use the "stage" rule. For example in the 
Jamfile of your external project you could add something like this:

stage ../<current working directory name> :

"stage . :"... might also work, but I don't remember if it does :-)

-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com - 102708583/icq

More information about the Cplusplus-sig mailing list