|
Boost-Build : |
Subject: [Boost-build] [bjam] source code generation
From: Yelve Yakut (yelve_at_[hidden])
Date: 2009-07-31 06:05:01
Hi
I am trying to generate C code from within a Jamroot file using the
rpcgen tool. The tool generates .c and .h files.
At first I tried to use a generator but the documentation does not
explain enough and only refers to an
example(boost_1_39_0/tools/build/v2/example) which does not work.
My best attempt so far, at least invokes the rpcgen command, but still
fails because it is looking for the generated .c files in the wrong
directory:
=== Result ===
"g++" -x c -O0 -fno-inline -Wall -g -I"header" -I"rpcgen" -c -o
"bin/gcc-4.3.3/debug/link-static/msg_xdr.o"
"bin/gcc-4.3.3/debug/link-static/./rpcgen/msg_xdr.c"
=== Jamroot ===
actions remotegen
{
cd ./rpcgen
./generate_rpc_stubs.sh
}
make ./rpcgen/msg_clnt.c : : remotegen ;
make ./rpcgen/msg_xdr.c : : remotegen ;
make ./rpcgen/msg_svc.c : : remotegen ;
....
alias rpcfiles : ./rpcgen/msg_clnt.c ./rpcgen/msg_xdr.c
./rpcgen/msg_proc.c ./rpcgen/msg_svc.c : ;
....
lib mylib
: [ glob ./src/*.c ] [ glob ./src/*.cpp ] network rpcfiles libraries
: <include>./header <include>./rpcgen <link>static ;
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