diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2010-06-24 16:55:14 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2010-06-24 16:55:14 +0100 |
commit | 6ffed4950c8e99d33858b615dd4ea144fe6cdc61 (patch) | |
tree | 8f0dbdfcf7cf9874d9cafa850df62e66a7d5985c /codegen.py | |
parent | c66e8d1f66a0bdbba4a5584d62cd98eb6837b642 (diff) | |
download | rabbitmq-server-6ffed4950c8e99d33858b615dd4ea144fe6cdc61.tar.gz |
Codegen up two different versions of rabbit_framing and provide a dispatcher to choose. The codegen now builds header files that are the union of 0-8 and 0-9-1.
Diffstat (limited to 'codegen.py')
-rw-r--r-- | codegen.py | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -315,8 +315,13 @@ def genErl(spec): methods = spec.allMethods() printFileHeader() - print """-module(rabbit_framing). --include("rabbit_framing.hrl"). + module = "rabbit_framing_amqp_%d_%d" % (spec.major, spec.minor) + if spec.revision != '0': + module = "%s_%d" % (module, spec.revision) + if module == "rabbit_framing_amqp_8_0": + module = "rabbit_framing_amqp_0_8" + print "-module(%s)." % module + print """-include("rabbit_framing.hrl"). -export([lookup_method_name/1]). |