[rabbitmq-discuss] Running codegen on its own (was Re: Codegen and Python 3.x)
Tony Garnock-Jones
tonyg at lshift.net
Thu Feb 18 20:30:10 GMT 2010
Alister Morton wrote:
> Where can I find a potted series of steps to follow to generate the
> code, please? I've used hg to pull down the latest, installed python
> 2. and the simplejson modules, but when I try to make or run
> amqp-codegen.py I can't see any output being generated (but I may be
> doing it in the wrong directory). I'm trying to end up with a build
> for VS2008 on windows XP - I'd a bit pushed at the moment for time,
> but this may become a proper project at some point.
The rabbitmq-codegen module is generic code used by all the specific
language libraries. For example, rabbitmq-server and rabbitmq-c both
have different "codegen.py" modules in them which use amqp_codegen.py to
parse and preprocess the specification definitions.
So for rabbitmq-c, just as one example,
hg clone http://hg.rabbitmq.com/rabbitmq-codegen
hg clone http://hg.rabbitmq.com/rabbitmq-c
(cd rabbitmq-c; autoreconf -i)
(cd rabbitmq-c; ./configure)
and then
make -C rabbitmq-c/librabbitmq amqp_framing.h amqp_framing.c
Take a look at rabbitmq-c/librabbitmq/codegen.py to get a feel for what
the various language-specific codegens are doing.
Regards,
Tony
More information about the rabbitmq-discuss
mailing list