summaryrefslogtreecommitdiff
path: root/codegen.py
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2010-06-24 16:55:14 +0100
committerSimon MacMullen <simon@rabbitmq.com>2010-06-24 16:55:14 +0100
commit6ffed4950c8e99d33858b615dd4ea144fe6cdc61 (patch)
tree8f0dbdfcf7cf9874d9cafa850df62e66a7d5985c /codegen.py
parentc66e8d1f66a0bdbba4a5584d62cd98eb6837b642 (diff)
downloadrabbitmq-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.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/codegen.py b/codegen.py
index 467b0285..9596f5b1 100644
--- a/codegen.py
+++ b/codegen.py
@@ -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]).