Fix INCLUDE_GUARD in create-module.py

This patch fixes two separate issues: first, it replaces "-" by "_" in addition to capitalizing module name when creating include guards, second, it names it consistently with the rest of ns-3.
This commit is contained in:
Vedran Miletić
2013-03-28 10:31:56 +01:00
parent b3b3fa9e22
commit c9152825c2

View File

@@ -344,7 +344,7 @@ def main(argv):
model_cc.close()
model_h = file(os.path.join(moduledir, "model", "%s.h" % modname), "wt")
model_h.write(MODEL_H_TEMPLATE % dict(MODULE=modname, INCLUDE_GUARD="__%s_H__" % (modname.upper()),))
model_h.write(MODEL_H_TEMPLATE % dict(MODULE=modname, INCLUDE_GUARD="%s_H" % (modname.replace("-", "_").upper()),))
model_h.close()