targets/toolchain_gcc.py
branchpython3
changeset 3755 ca814b175391
parent 3750 f62625418bff
child 3893 5b2f3a915a43
equal deleted inserted replaced
3754:98a76dbb1b6d 3755:ca814b175391
   134         # Get latest computed hash and deps
   134         # Get latest computed hash and deps
   135         oldhash, deps = self.srcmd5.get(bn, (None, []))
   135         oldhash, deps = self.srcmd5.get(bn, (None, []))
   136         # read source
   136         # read source
   137         src = open(os.path.join(self.buildpath, bn)).read()
   137         src = open(os.path.join(self.buildpath, bn)).read()
   138         # compute new hash
   138         # compute new hash
   139         newhash = hashlib.md5(src).hexdigest()
   139         newhash = hashlib.md5(src.encode()).hexdigest()
   140         # compare
   140         # compare
   141         match = (oldhash == newhash)
   141         match = (oldhash == newhash)
   142         if not match:
   142         if not match:
   143             # file have changed
   143             # file have changed
   144             # update direct dependencies
   144             # update direct dependencies