Add more information to the comments at the top of the files we generate.
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 25 Aug 2009 17:55:55 +0000 (17:55 +0000)
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 25 Aug 2009 17:55:55 +0000 (17:55 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29550 f5534014-38df-0310-8fa8-9805f1628bb7

tools/make-dissector-reg.py

index 906bd10a8bb24599f6723d7d8171e5a06136f6c9..ae41cbff3bed506d7f822ae71528f08018b73159 100755 (executable)
@@ -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":