diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2015-12-16 01:13:56 +0100 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2015-12-16 01:17:06 +0100 |
commit | 2522cfe53942421892aa2c4741e7e9237db7c828 (patch) | |
tree | a04c0b86622f42620915ff137922b2d89a517731 /components/script/dom/bindings/codegen/BindingGen.py | |
parent | 85b43ea31726776b5d9aafa58786850c12e2c852 (diff) | |
download | servo-2522cfe53942421892aa2c4741e7e9237db7c828.tar.gz servo-2522cfe53942421892aa2c4741e7e9237db7c828.zip |
Do not create modules from files with nothing to codegen (fixes #8711)
Diffstat (limited to 'components/script/dom/bindings/codegen/BindingGen.py')
-rw-r--r-- | components/script/dom/bindings/codegen/BindingGen.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/components/script/dom/bindings/codegen/BindingGen.py b/components/script/dom/bindings/codegen/BindingGen.py index 5debf3e1f0f..6b1f10c44e2 100644 --- a/components/script/dom/bindings/codegen/BindingGen.py +++ b/components/script/dom/bindings/codegen/BindingGen.py @@ -18,8 +18,10 @@ def generate_binding_rs(config, outputprefix, webidlfile): """ filename = outputprefix + ".rs" - root = CGBindingRoot(config, outputprefix, webidlfile) - if replaceFileIfChanged(filename, root.define()): + module = CGBindingRoot(config, outputprefix, webidlfile).define() + if not module: + print "Skipping empty module: %s" % (filename) + elif replaceFileIfChanged(filename, module): print "Generating binding implementation: %s" % (filename) |