Commit 47a34c87 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

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 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.

git-svn-id: svn:// e5f2f494-b856-4b98-b285-d166d9295462
parent f8d13770
......@@ -129,12 +129,13 @@ def import_definitions(classcode2txt, typecode2txt, typeandclass):
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 @@ if __name__ == "__main__":
generate_rdatadef('@builddir@/', rdatadef_mtime)
generate_rdatahdr('@builddir@/rdataclass.h', rdata_declarations,
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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment