Bug 909415. Fix binding .pp files to not overbuild due to listing dependencies for the wrong file. r=khuey

This commit is contained in:
Boris Zbarsky 2013-08-28 00:14:55 -04:00
parent 3c5b0c6b29
commit 0febfd8ab1

View File

@ -23,7 +23,12 @@ def generate_binding_files(config, outputprefix, srcprefix, webidlfile):
replaceFileIfChanged(outputprefix + ".cpp", root.define())
mk = Makefile()
rule = mk.create_rule([outputprefix + '.h', outputprefix + '.cpp'])
# NOTE: it's VERY important that we output dependencies for the FooBinding
# file here, not for the header or generated cpp file. These dependencies
# are used later to properly determine changedDeps and prevent rebuilding
# too much. See the comment explaining $(binding_dependency_trackers) in
# Makefile.in.
rule = mk.create_rule([outputprefix])
rule.add_dependencies(os.path.join(srcprefix, x) for x in root.deps())
rule.add_dependencies(iter_modules_in_path(topsrcdir))
with open(depsname, 'w') as f: