Boost logo

Boost-Build :

Subject: [Boost-build] Newbie: How to specify a command with relative path in jamfile?
From: Min Wang (qiaorang_at_[hidden])
Date: 2013-01-14 10:14:08


Hello,

In boost build, we can create our own rule to translate file from one
format to another, for example, my company has a file format ".pyr", we
developed a tool called pyr_c to compile ".pyr" file into C++ code. I can
use Jamfile to handle .pyr file by create a pyr.jam like:
---------------------------------
...
type.register PYR : pyr ;
...
generators.register [ new pyr-generator pyr.compile : PYR : CPP H ] ;

actions compile
{
     pyr_c --cpp_out=$(<[0]:D) $(>)
}
---------------------------------
It will work and process the .pyr file. But I have to put the pyr_c in a
known place, such as /usr/local/bin, so that bjam can find it.

If I want to build pyr_c from source code before use it in Jamfile, how to
do it?

The difficulty for me is: pyr_c will then sit in a place relative to the
source code, it is not in PATH, nor can I use absolute path of it in
Jamfile which may be different in other developer's machine.

Can anyone help?

Thanks

-Bo



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