Currently, if *any* of IDL files is updated, then generate-bindings.pl runs for *all* IDL files, and all .h/.cpp files are re-generated and rebuilt. We can stop the redundant rebuilding by having CodeGenerators write the output .h/.cpp file to a temp file and then overwrite the .h/.cpp only if the bytes differ.
I'll get things done in the following steps: [1] Remove finish() from CodeGeneratorV8.pm. [2] Remove finish() from CodeGeneratorJS.pm. [3] Remove finish() from CodeGenerator{ObjC,GObject,CPP}.pm and CodeGenerator.pm. [4] Make a change on CodeGeneratorV8.pm and CodeGenerator.pm to overwrite .h/.cpp files only when the bytes differ. [5] Make similar changes on CodeGeneratorJS.pm. [6] Make similar changes on CodeGenerator{ObjC,GObject,CPP}.pm.
Sounds like a good idea.
Can we change this so code is shared while doing the work 6 times?
(In reply to comment #3) > Can we change this so code is shared while doing the work 6 times? Sure. I'll make UpdateFileIfChanged() in CodeGenerator.pm and use it from all CodeGenerators.
*** Bug 117708 has been marked as a duplicate of this bug. ***