aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/BindingGen.py
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2015-09-02 15:16:44 -0400
committerCorey Farwell <coreyf@rwell.org>2015-09-02 16:14:04 -0400
commit8792aa7fc0630927302b2039698051f7e01fc190 (patch)
treef160f63e2870cb08052d2086774d84532045e769 /components/script/dom/bindings/codegen/BindingGen.py
parentb7c88dd547c01d99c77c90329cc09f13a90a53b7 (diff)
downloadservo-8792aa7fc0630927302b2039698051f7e01fc190.tar.gz
servo-8792aa7fc0630927302b2039698051f7e01fc190.zip
Allow 'script' component to enter a 'built' state
After this pull request merged: https://github.com/servo/servo/pull/7209 the 'script' component would never enter a 'built' state. In other words, if one calls `mach build`, lets it complete, then calls `mach build` again, the 'script' component would rebuild even though we supposedly just built it. This was due to the `ParserResults.pkl` getting placed in the `components/script` directory instead of the output directory, causing cargo to think that there were unbuilt files.
Diffstat (limited to 'components/script/dom/bindings/codegen/BindingGen.py')
-rw-r--r--components/script/dom/bindings/codegen/BindingGen.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/components/script/dom/bindings/codegen/BindingGen.py b/components/script/dom/bindings/codegen/BindingGen.py
index 810f52db566..0649db6f1f9 100644
--- a/components/script/dom/bindings/codegen/BindingGen.py
+++ b/components/script/dom/bindings/codegen/BindingGen.py
@@ -26,20 +26,22 @@ def generate_binding_rs(config, outputprefix, webidlfile):
def main():
# Parse arguments.
from optparse import OptionParser
- usagestring = "usage: %prog configFile outputPrefix webIDLFile"
+ usagestring = "usage: %prog configFile outputdir outputPrefix webIDLFile"
o = OptionParser(usage=usagestring)
o.add_option("--verbose-errors", action='store_true', default=False,
help="When an error happens, display the Python traceback.")
(options, args) = o.parse_args()
- if len(args) != 3:
+ if len(args) != 4:
o.error(usagestring)
configFile = os.path.normpath(args[0])
- outputPrefix = args[1]
- webIDLFile = os.path.normpath(args[2])
+ outputdir = args[1]
+ outputPrefix = args[2]
+ webIDLFile = os.path.normpath(args[3])
# Load the parsing results
- with open('ParserResults.pkl', 'rb') as f:
+ resultsPath = os.path.join(outputdir, 'ParserResults.pkl')
+ with open(resultsPath, 'rb') as f:
parserData = cPickle.load(f)
# Create the configuration data.