[svn] commit: r3231 - /trunk/src/lib/dns/gen-rdatacode.py.in

BIND 10 source code commits bind10-changes at lists.isc.org
Fri Oct 15 14:56:05 UTC 2010


Author: jinmei
Date: Fri Oct 15 14:56:05 2010
New Revision: 3231

Log:
applied the patch proposed in trac #371:
 - in order to decide whether to update rrclass.h, check mtime of dns/rdata instead of that of dns/rdata/in_1, etc. in fact, this is more accurate because what we want to know is when a new supported RR class is added (in_1, ch_3, etc) rather than when some RR type is changed under an RR class. this will also reduce the frequency of updating rrclass.h, and help reduce compile time.
 - in order to decide whether to update rrtype.h, check the mtimes of rrtype_nn.h files only, while the current version also checks the mtimes of rrtype_nn.cc files. Assuming all .cc files have corresponding .h files, this should be sufficient, and this also helps reduce the frequency of updating rrtype.h (and compile time) when we are updating the definition of some RDATA.

Modified:
    trunk/src/lib/dns/gen-rdatacode.py.in

Modified: trunk/src/lib/dns/gen-rdatacode.py.in
==============================================================================
--- trunk/src/lib/dns/gen-rdatacode.py.in (original)
+++ trunk/src/lib/dns/gen-rdatacode.py.in Fri Oct 15 14:56:05 2010
@@ -129,12 +129,13 @@
     global rdatadef_mtime
     global rdatahdr_mtime
 
+    if classdir_mtime < getmtime('@srcdir@/rdata'):
+        classdir_mtime = getmtime('@srcdir@/rdata')
+
     for dir in list(os.listdir('@srcdir@/rdata')):
         classdir = '@srcdir@/rdata' + os.sep + dir
         m = re_typecode.match(dir)
         if os.path.isdir(classdir) and (m != None or dir == 'generic'):
-            if classdir_mtime < getmtime(classdir):
-                classdir_mtime = getmtime(classdir)
             if dir == 'generic':
                 class_txt = 'generic'
                 class_code = generic_code
@@ -283,9 +284,7 @@
         generate_rdatadef('@builddir@/rdataclass.cc', rdatadef_mtime)
         generate_rdatahdr('@builddir@/rdataclass.h', rdata_declarations,
                           rdatahdr_mtime)
-        generate_typeclasscode('rrtype',
-                               max(rdatadef_mtime, rdatahdr_mtime),
-                               typecode2txt, 'Type')
+        generate_typeclasscode('rrtype', rdatahdr_mtime, typecode2txt, 'Type')
         generate_typeclasscode('rrclass', classdir_mtime,
                                classcode2txt, 'Class')
         generate_rrparam('rrparamregistry', rdatahdr_mtime)




More information about the bind10-changes mailing list