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 | 54e7807e288b84fc0a574a43bc784a090e2341f2 (patch) | |
| tree | 8f0dbdfcf7cf9874d9cafa850df62e66a7d5985c /codegen.py | |
| parent | 91aee115be7cfbff56ada0bfe979ce7598325875 (diff) | |
| download | rabbitmq-server-git-54e7807e288b84fc0a574a43bc784a090e2341f2.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
diff --git a/codegen.py b/codegen.py index 467b0285d2..9596f5b1b8 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]). |
