aboutsummaryrefslogtreecommitdiffstats
path: root/tools/make-dissector-reg.py
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2009-08-25 17:55:55 +0000
committerGerald Combs <gerald@wireshark.org>2009-08-25 17:55:55 +0000
commit4968b876cd00feb8828bd597ea4fc5c3185e9d27 (patch)
tree8c0cc16585ec844ff9f43c17087e7d85ea5857a7 /tools/make-dissector-reg.py
parent4e87c254f0a561297b157940a0b6bb0bf70d81cc (diff)
Add more information to the comments at the top of the files we generate.
svn path=/trunk/; revision=29550
Diffstat (limited to 'tools/make-dissector-reg.py')
-rwxr-xr-xtools/make-dissector-reg.py22
1 files changed, 20 insertions, 2 deletions
diff --git a/tools/make-dissector-reg.py b/tools/make-dissector-reg.py
index 906bd10a8b..ae41cbff3b 100755
--- a/tools/make-dissector-reg.py
+++ b/tools/make-dissector-reg.py
@@ -35,10 +35,29 @@ if registertype == "plugin" or registertype == "plugin_wtap":
tmp_filename = "plugin.c-tmp"
final_filename = "plugin.c"
cache_filename = None
+ preamble = """\
+/*
+ * Do not modify this file.
+ *
+ * It is created automatically by Makefile or Makefile.nmake.
+ */
+"""
elif registertype == "dissectors":
tmp_filename = "register.c-tmp"
final_filename = "register.c"
cache_filename = "register-cache.pkl"
+ preamble = """\
+/*
+ * Do not modify this file.
+ *
+ * It is created automatically by the "register.c" target in
+ * epan/dissectors/Makefile or Makefile.nmake using information in
+ * epan/dissectors/register-cache.pkl.
+ *
+ * You can force this file to be regenerated completely by deleting
+ * it along with epan/dissectors/register-cache.pkl.
+ */
+"""
else:
print "Unknown output type '%s'" % registertype
sys.exit(1)
@@ -156,8 +175,7 @@ regs['wtap_register'].sort()
reg_code = open(tmp_filename, "w")
-reg_code.write("/* Do not modify this file. */\n")
-reg_code.write("/* It is created automatically by the Makefile. */\n")
+reg_code.write(preamble)
# Make the routine to register all protocols
if registertype == "plugin" or registertype == "plugin_wtap":