Do not create modules from files with nothing to codegen (fixes #8711)

This commit is contained in:
Anthony Ramine 2015-12-16 01:13:56 +01:00
parent 85b43ea317
commit 2522cfe539
2 changed files with 16 additions and 10 deletions

View file

@ -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)