diff --git a/src/components/script/dom/bindings/codegen/CodegenRust.py b/src/components/script/dom/bindings/codegen/CodegenRust.py index 055cb0ce488..0cad50c7719 100644 --- a/src/components/script/dom/bindings/codegen/CodegenRust.py +++ b/src/components/script/dom/bindings/codegen/CodegenRust.py @@ -24,16 +24,21 @@ def replaceFileIfChanged(filename, newContents): Read a copy of the old file, so that we don't touch it if it hasn't changed. Returns True if the file was updated, false otherwise. """ - oldFileContents = "" - try: - oldFile = open(filename, 'rb') - oldFileContents = ''.join(oldFile.readlines()) - oldFile.close() - except: - pass + #XXXjdm This doesn't play well with make right now. + # Force the file to always be updated, or else changing CodegenRust.py + # will cause many autogenerated bindings to be regenerated perpetually + # until the result is actually different. - if newContents == oldFileContents: - return False + #oldFileContents = "" + #try: + # oldFile = open(filename, 'rb') + # oldFileContents = ''.join(oldFile.readlines()) + # oldFile.close() + #except: + # pass + + #if newContents == oldFileContents: + # return False f = open(filename, 'wb') f.write(newContents)